Re: Templating

From: Date: Tue, 05 Feb 2002 03:29:32 +0000
Subject: Re: Templating
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-83512@lists.php.net to get a copy of this message
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 <torben@php.net> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506

« previous php.general (#83512) next »