March 21st, 2013, 08:38 PM
FOpen permission denied
Array ( [type] => 2 [message] => fopen(TestFile.txt): failed to open stream: Permission denied [file] => /home/vhosts/king-trading.freeoda.com/CSS_Creator/my_css.php [line] => 3 )
Just was doing a simple fopen test and it denies it.
The file does exist though. Any idea how to fix this error?
$myFile = "TestFile.txt";
$fh = fopen($myFile, 'w') or die(print_r(error_get_last(),true));
$stringData = "Floppy Jalopy\n";
$stringData = "Pointy Pinto\n";
March 21st, 2013, 09:01 PM
Does PHP have permissions to write to the file? Try changing its permissions to 0666.
March 21st, 2013, 11:13 PM
Ahh, forgot about that permission setting.. thanks
March 22nd, 2013, 08:43 AM
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.