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);
}
感謝您的幫助