程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> PHP腳本中include文件出錯解決方法

PHP腳本中include文件出錯解決方法

編輯:關於PHP編程

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權限是否打開,該權限決定了目錄能否被浏覽。

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved