0
中的权限被拒绝我正在执行脚本(通过php)。警告:fopen(./channels/tvchannel/13_03.html)[function.fopen]:未能打开流:在
每当我执行它,我得到以下错误:
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
首先,我认为这是文件夹权限的问题,所以我设置涉及775
线187到192的所有文件夹读出为按照我的script.php内
$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);
}
感谢您的帮助