Re: fwrite() debugging
| From: | Timothy Hitchens \(HiTCHO\) | Date: | Tue, 31 Dec 2002 20:25:27 +0000 |
| Subject: | Re: fwrite() debugging | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129796@lists.php.net to get a copy of this message | ||
The $fd is the file handler now not the $filename.
Timothy Hitchens (HiTCHO)
tim@hitcho.com.au
HiTCHO | Open Platform Web Development
Consutling - Outsourcing - Training - Support
----- Original Message -----
From: "Alberto Brea" <estudiobrea@fibertel.com.ar>
To: <php-general@lists.php.net>
Sent: Wednesday, January 01, 2003 6:27 AM
Subject: [PHP] fwrite() debugging
Could somebody please tell me what I'm doing wrong here?
The code is:
<?php $filename= "tables/contacts.txt";
$fd=fopen($filename, "a");
fwrite($filename, "xyz");
fclose($fd); ?>
And I get the following error message:
"Warning: fwrite(): supplied argument is not a valid File-Handle resource in
c:\archivos de programa\apache
group\apache\htdocs\visitrep\report_options.inc on line 111"
Thanks a lot in advance and happy new year!
Alberto Brea
http://estudiobrea.com