国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 開(kāi)發(fā) > PHP > 正文

解答網(wǎng)頁(yè)中PHP腳本中include文件報(bào)錯(cuò)的方法

2024-05-04 21:52:14
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

經(jīng)常當(dāng)php頁(yè)面中利用include, require, require_once包含了一些其他位置的頁(yè)面時(shí),會(huì)出現(xiàn)錯(cuò)誤,比如沒(méi)有發(fā)現(xiàn)次頁(yè)面,或者權(quán)限不允許等,可以根據(jù)以下方法來(lái)排除

1. 出現(xiàn)“未找到文件“類(lèi)似的錯(cuò)誤時(shí)候,檢查include文件的位置是否正確,下面引用php手冊(cè)頁(yè)面的原話(huà):

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. 當(dāng)出現(xiàn)permission deny 類(lèi)似錯(cuò)誤的時(shí)候,按以下方法排除

a) 檢測(cè)被包含的文件讀權(quán)限是否打開(kāi)

b) 檢測(cè)被包含的文件路徑上的每個(gè)目錄的x權(quán)限是否打開(kāi),該權(quán)限決定了目錄能否被瀏覽。
 

發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 科技| 上高县| 临沭县| 壶关县| 宁安市| 兴城市| 渝北区| 阿巴嘎旗| 马鞍山市| 阿坝县| 通辽市| 延吉市| 洛阳市| 温州市| 塔城市| 海口市| 越西县| 遂川县| 凌云县| 虹口区| 镇坪县| 崇州市| 高平市| 清河县| 太仓市| 莒南县| 惠州市| 昌都县| 阿合奇县| 元朗区| 泾阳县| 康马县| 荥阳市| 连南| 洛宁县| 望都县| 红桥区| 惠水县| 永善县| 重庆市| 孝感市|