On Sunday 17 March 2002 12:53, Ben Waldher wrote:
> I'm having some trouble writing data to a file, when I use this code it
> works fine:
> <?php
>
> $file = fopen("template.txt", "w");
>
> fwrite ($file, $temp);
>
> fclose ($file);
>
> ?>
>
> But several problems with this occur:
>
> <?php
>
> $stuff = include ("news.txt");
>
> $file = fopen ("news.txt", "w");
>
> $newnews = include ("template.txt") . $stuff;
>
> fwrite ($file, $newnews);
>
> ?>

include() is not the way to read files, use the Filesystem Functions for that.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
A few hours grace before the madness begins again.
*/

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

Reply via email to