2013-03-11 136 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是否可用。

相关问题