Editing files outside of the public_html folder from inside the public_html folder
<p>Using php, how can I edit a file that is located in a folder outside of the public_html folder from a file that is located inside the public_html folder?  I tried using the include function for the filename of the file outside of the public_html folder, but it runs the external file displaying contents of it (using fputs) for the current file instead of just updating the external file.</p>

<pre><code>&lt;?php 
include "hits.txt"; 
$filename = "hits.txt"; 
$count = file($filename); 
$count[0]++; 
$file = fopen ($filename, "w") or die ("Cannot find $filename"); 
fputs($file, "$count[0]"); 
fclose($file); 
?&gt; 
</code></pre>
