今天就跟大家聊聊有關(guān)php include失敗怎么辦,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結(jié)了以下內(nèi)容,希望大家根據(jù)這篇文章可以有所收獲。
php include失敗的解決辦法:1、檢查include文件的位置是否正確;2、檢測(cè)被包含的文件讀權(quán)限是否打開;3、檢測(cè)被包含的文件路徑上的每個(gè)目錄的x權(quán)限是否打開。
PHP腳本中include文件出錯(cuò)解決方法
經(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)“未找到文件“類似的錯(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)限決定了目錄能否被瀏覽。
看完上述內(nèi)容,你們對(duì)php include失敗怎么辦有進(jìn)一步的了解嗎?如果還想了解更多知識(shí)或者相關(guān)內(nèi)容,請(qǐng)關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道,感謝大家的支持。
網(wǎng)頁(yè)題目:phpinclude失敗怎么辦-創(chuàng)新互聯(lián)
網(wǎng)址分享:http://aaarwkj.com/article44/dohiee.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)網(wǎng)站制作、建站公司、云服務(wù)器、網(wǎng)站導(dǎo)航、網(wǎng)站排名、手機(jī)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容