Can't open file in php
<p>I'm trying to open a file with php for write access:</p>

<pre><code>$myFile = "all.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
</code></pre>

<p>My browser is spitting back "can't open file"</p>

<p>I've tried to chmod -R 777 the folder where this php file is as well as where $myFile (a text file) sits. What else could be the problem?</p>

<p>It ends up being that there are permission errors when I turn error reporting on. When I do <code>ls -la all.txt</code>, I get <code>-rwx------  1 Myname  staff  0 Nov  8 15:11 all.txt</code></p>
