php include提示failed to open stream: Permission denied in錯誤
出現failed to open stream: Permission denied in是apache運行使用者沒用許可權去訪問指定的檔案了,所以導致目錄檔案打不開了。
在開啟瀏覽器時提示
Warning: include (/global.php) [function.include]: failed to open stream: Permission denied in \index.php on line 21
Warning: include() [function.include]: Failed opening '/global.php' for inclusion (include_path='.;C:\php5\pear') in index.php on line 21
Fatal error: Class 'fl_global' not found in \index.php on line 22
從這麼多錯誤提示中我們可以看出一句failed to open stream: Permission denied in了,意思是說沒有許可權訪問這個問題
linux 解決辦法
linux下
chmod -R 777 ./dirname 賦予目錄可寫入權限
chmod 777 ./filename 賦予檔案可寫入權限.
windows 2003解決辦法
我是apache 使用者所以只需要給apache使用者權限就可以了(如果是iis使用者還需要在iis中設定許可權哦)
例子:右擊www或web目錄,然後在彈出點擊“安全與共用”或“屬性”也可以開啟之後選擇安全之類的,然後增加使用者並設定訪問使用者的許可權必須選中所示了,注意了,我們增加訪問使用者必須與apache目錄是一樣的才可以哦。
http://www.bkjia.com/PHPjc/890392.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/890392.htmlTechArticlephp include提示failed to open stream: Permission denied in錯誤 出現failed to open stream: Permission denied in是apache運行使用者沒用許可權去訪問指定的檔案了,所...