On Mon, 2002-02-04 at 18:20, Trent Gillespie wrote:
> I have a template file that I would like to add the content to no write over it. I 
>want the string $content to be added to my template instead of writing over it. Here 
>is my current script
> $tutorial = "template.php";
> $fp = fopen("$tutorial","w");
> fputs($fp, $content, strlen($content));
> If you need any other info please just ask. And if you dont get my question aske 

Use 'a' instead of 'w' as the file open mode in your fopen() call:

  $fp = fopen($tutorial, 'a');

This is documented on the fopen() page in the manual, btw:


Hope this helps,


 Torben Wilson <[EMAIL PROTECTED]>

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to