2013-03-11 57 views
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); 
} 

感謝您的幫助

回答

0

據我所知,你正在給w+打開文件。但正如您所說,您只能獲得文件夾的775權限。

即沒有公共寫入權限。授予777權限並執行。 Findout是否可用。

相關問題