Re: fwrite will not work
| From: | Joao Prado Maia | Date: | Tue, 12 Sep 2000 18:44:55 +0000 |
| Subject: | Re: fwrite will not work | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16420@lists.php.net to get a copy of this message | ||
On Tue, 12 Sep 2000 lance@dallypost.com wrote:
> I have read and reread the documentation on this subject and I am still way
> confused. I am attempting to save that contents of $prepend to the file
> named by $filename.
>
> Problem: It will not work.
>
> Help!!
>
> $filename "/www/dhtdocs/aboutus.php";
> $prepend "A whole bunch of html code";
>
> $file = fopen ($filename, "w") or die ("unable to open $filename for
> read");
> fwrite ($file, $prepend);
> fclose ($file);
>
> Lance Earl
What is exactly the error you are getting ? The "unable to open
$filename" one ?
If that's the one, maybe you don't have permission to open the file.
Joao
--
Joao Prado Maia
Web Developer
Kefta.com, Inc