php include提示failed to open stream: Permission denied in錯誤

來源:互聯網
上載者:User

在開啟瀏覽器時提示

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目錄是一樣的才可以哦。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.