I am trying to open a file with PHP for write access:
$myFile = "all.txt"; $fh = fopen($myFile, 'w') or die("can't open file");
My browser spits back:
cannot open file
I tried chmod -R 777 the folder where this PHP file is located, as well as where $ myFile (text file) is located. What else could be the problem?
As a result, a permission error appears when I turn on the error report. When I do ls -la all.txt , I get -rwx------ 1 Myname staff 0 Nov 8 15:11 all.txt
source share