On 29 Apr 2002 at 0:26, Rodrigo wrote:

> Ok guys, this is the code and under it you can see what I get when I try
> to submit the form. 
>  
>  
> <?php
> $file_pointer=file('emails.txt','a') || exit;
> $string_to_write = ("$newmail")."\n";
> $s=fopen($file_pointer,$string_to_write);
> $s=fclose($fp);
> ?>
>  
>  
> Warning: Supplied argument is not a valid File-Handle resource in
> /home/restricted/home/h4ck3r/public_html/write.php on line 4
> 
> Warning: Supplied argument is not a valid File-Handle resource in
> /home/restricted/home/h4ck3r/public_html/write.php on line 6 
> 

I haven't actually checked your code on my development box and I 
haven't done file i/o for a while so this does not address any syntax 
errors that might exist, but...

What is the operating system?  Do you have sufficient permissions to 
be writing files in that directory?  What permissions are set on the 
file you're trying to append to?

If you can't work with files in that directory because of directory 
permissions then it won't work.  If the file has permissions that 
prevents the web server process from accessing it then you also won't 
be able to get it working.

CYA, Dave


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

Reply via email to