Hi i m pretty new to php.
i m having the following problem while running the php file.
<?
$emailaddr = $_POST["emailaddr"];
$filename = "log.rtf";
$date = date("l F dS, Y");
$file = fopen($filename,"a");
fputs($file,"$date >> $emailaddr\n");
fclose($file);
?>
The result i m getting is :
Warning: fopen(log.rtf): failed to open stream: Permission denied in /home/is7050/public_html/subscribemail.php on line 414
Warning: fputs(): supplied argument is not a valid stream resource in /home/is7050/public_html/subscribemail.php on line 415
Warning: fclose(): supplied argument is not a valid stream resource in /home/is7050/public_html/subscribemail.php on line 416
Help me out. thanks.
PHP Mailing list Subscription
Moderator: General Moderators
-
kishorekodru
- Forum Newbie
- Posts: 2
- Joined: Tue Aug 16, 2005 7:09 am
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
the folder (or file) you are trying to open is not read-writable by your script's user. You may be able to use chmod() to get it writable, but your script may run under a completely different user (nobody)