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
>again.
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:
http://www.php.net/fopen
Hope this helps,
Torben
--
Torben Wilson <[EMAIL PROTECTED]>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php