Warning: fopen(./channels/tvchannel/13_03.html) [function.fopen]: failed to open stream: Permission denied in
<p>I'm executing a script (through php).</p>

<p>Whenever I execute it I get the following errors:</p>

<pre><code>Warning: fopen(./channels/tvchannel/13_03.html) [function.fopen]:     failed to open stream: Permission denied in /home/tvguide/public_html/script.php on line 189

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/tvguide/public_html/script.php on line 190

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/tvguide/public_html/script.php on line 191
</code></pre>

<p>First, I thought it was a problem of folder permission so I set all folders involved with 775.</p>

<p>The line 187 to 192 read as follow inside my script.php</p>

<pre><code>$file_to_update = "$mypage/$suff/$txt_url.html";
if(!file_exists($file_to_update)) {
$stream = fopen($file_to_update, "w+");
fwrite($stream, $text);
fclose($stream);
}
</code></pre>

<p>Thanks for your help</p>
