簡介:這是網頁中PHP指令碼中include檔案報錯解決方案的詳細頁面,介紹了和php,有關的知識、技巧、經驗,和一些php源碼等。
class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=323151' scrolling='no'>
經常當php頁面中利用include, require, require_once包含了一些其他位置的頁面時,會出現錯誤,比如沒有發現次頁面,或者許可權不允許等,可以根據以下方法來排除
1. 出現“未找到檔案“類似的錯誤時候,檢查include檔案的位置是否正確,下面引用php手冊頁面的原話:
Files for including are first looked in include_path relative to the current working directory and then in the directory of the current script. E.g. if your include_path is libraries, current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/libraries/ and then in /www/include/. If filename begins with ./ or ../, it is looked only in include_path relative to the current working directory.
2. 當出現permission deny 類似錯誤的時候,按以下方法排除
a) 檢測被包含的檔案讀許可權是否開啟
b) 檢測被包含的檔案路徑上的每個目錄的x許可權是否開啟,該許可權決定了目錄能否被瀏覽。
“網頁中PHP指令碼中include檔案報錯解決方案”的更多相關文章 》
愛J2EE關注Java邁克爾傑克遜視頻站JSON線上工具
http://biancheng.dnbcw.info/php/323151.html pageNo:16