Coaster member
Member # Joined: 19 Feb 2002 Posts: 508 Location: Canada
|
Posted: Fri Feb 22, 2002 10:46 pm |
|
 |
Hmm, an earlier post got me thinking about how to make it so people can post comments using PHP.
I've got the script done.. but it returns the error:
Warning: fopen("borken.txt","a") - Permission denied in /home/lepusoft/public_html/somesource.php on line 22
Warning: Supplied argument is not a valid File-Handle resource in /home/lepusoft/public_html/somesource.php on line 23
Error writing to file!
I'm thinking the problem is with my server itself in not allow to write to files, but it might not be (I'm new to PHP so..)
Heres the problematic part of the script if there is a problem:
<?
$user_row = "<a href=\"mailto:".$usermail."\">".$usermail."</a> | ".$timestamp." | ".$userip."<br>".$comments."\n";
?>
<?
$fd = fopen("borken.txt", "a");
fwrite($fd, $user_row) or die("Error writing to file!");
fclose($fd);
print "Thank you, data stored correctly";
?>
All the variables work fine.
Please help.. I'm really stumped on this one.
~Jeff |
|