I'm trying to add a string to a TXT file on my webserver (hosted on asmallorange), and I get this error:
Why can't I write to the file? How can I give my script permission to edit the file? Both the file and the script are located in the exact same location on the server.
Thanks for any help you can provide!
"Warning: fopen(story.txt) [function.fopen]: failed to open stream:
Permission denied in /tryphp.php (I abbreviated the location) on line 36
Why can't I write to the file? How can I give my script permission to edit the file? Both the file and the script are located in the exact same location on the server.
Thanks for any help you can provide!
Code:
//make addition
$myFile="story.txt";
$fh = fopen($myFile, 'a+');
fwrite($fh, $addition);