Try

<?php 

$filename= "tables/contacts.txt";
$fd=fopen($filename, "a");
if(!($fd)){
        die("Unable to open file");
}
fwrite($fd, "xyz");
fclose($fd); 

?>



*********** REPLY SEPARATOR  ***********

On 31/12/2002 at 5:27 PM Alberto Brea wrote:

>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





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

Reply via email to