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

首頁 > 開發(fā) > PHP > 正文

php中include文件報(bào)錯(cuò)解決方法

2024-05-04 21:52:52
字體:
供稿:網(wǎng)友

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

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

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 類似錯(cuò)誤的時(shí)候,按以下方法排除

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

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

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 台中市| 凤城市| 历史| 乌鲁木齐县| 三都| 柯坪县| 乐都县| 甘泉县| 景谷| 公主岭市| 定边县| 栾城县| 汉川市| 临桂县| 河北区| 湖州市| 江孜县| 全州县| 日照市| 舒兰市| 九寨沟县| 达日县| 郴州市| 咸丰县| 西城区| 自贡市| 无为县| 田东县| 奉化市| 沂水县| 黄石市| 泽库县| 文昌市| 邛崃市| 金华市| 普洱| 大同县| 安乡县| 吴旗县| 哈密市| 静安区|