I have this code, but it says it is not able to open it:
$myFile = "/home/user/Desktop/webapp.log"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "Stuff"; fwrite($fh, $stringData); fclose($fh);
check if this files really exists and php has permission to read/write to that file
On my Linux machine, it is set to: -rw-r--r--
I changed it to 777 for chmod, and can now access it.