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

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

PHP_include文件出錯(cuò)的解決方法

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

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

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

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) 檢測(cè)被包含的文件讀權(quán)限是否打開

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

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 阳泉市| 沙河市| 禹州市| 兴宁市| 怀化市| 綦江县| 安平县| 呼玛县| 南华县| 和平区| 武宣县| 松原市| 梓潼县| 崇礼县| 龙口市| 宜兰县| 来安县| 博罗县| 广汉市| 鄂州市| 新郑市| 西平县| 红原县| 渝北区| 平安县| 湟源县| 岳普湖县| 武宁县| 石城县| 刚察县| 兴仁县| 岳池县| 杂多县| 莱州市| 湄潭县| 策勒县| 阿克苏市| 吴堡县| 湟中县| 南澳县| 白河县|