宅男在线永久免费观看网直播,亚洲欧洲日产国码无码久久99,野花社区在线观看视频,亚洲人交乣女bbw,一本一本久久a久久精品综合不卡

全部
常見問題
產(chǎn)品動態(tài)
精選推薦

failed to open stream: No such file or directory問題解決大全

管理 管理 編輯 刪除

這篇文章主要為大家詳細(xì)介紹了failed to open stream: No such file or directory問題解決大全,具有一定的參考價值,感興趣的小伙伴們可以參考一下,有需要的朋友可以收藏方便以后借鑒。

failed to open stream: No such file or directory是PHP站點(diǎn)經(jīng)??赡軙龅降膯栴},361源碼做了個總結(jié),希望能幫助到一些遇到這個問題的朋友們。

案例一

(failed to open stream: No such file or directory)在IIS下PHP環(huán)境配置的目錄權(quán)限導(dǎo)致出錯的問題

原因及解決方法

配置環(huán)境為 IIS + php

如果確認(rèn)你的程序在其他環(huán)境下下可以正常運(yùn)行而唯獨(dú)在Win 下的 IIS 出現(xiàn)類似如下的錯誤:

Warning: main(./Config.php): failed to open stream: No such file or directory in D:/wwwroot/Demo/Config.php on line 13

Fatal error: main(): Failed opening required './Config.php' (include_path='.;c:/php4/pear') in D:/wwwroot/Core/Config.php on line 13

這個問題主要是 由于Win NTFS盤下去除了everyone 權(quán)限引起的, 在安全權(quán)限中加個 Internet 來賓賬號就解決了.

操作步驟: D盤 -> 屬性 -> 安全 -> 添加 用戶 IUSR_XXXXX OK

案例二

問題就是:

Warning: require_once(../lib/DBUtil.class.php) [function.require-once]: failed to open stream: No such file or directory in E:/phppro/dxh/service/ExpertService.class.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '../lib/DBUtil.class.php' (include_path='.;C:/php5/pear') in E:/phppro/dxh/service/ExpertService.class.php on line 2

解決方法

  1. 在require時加上dirname(__FILE__),像這樣: require_once(dirname(__FILE__)."/../lib/DBUtil.class.php");
  2. 如下理解 require_once實(shí)例:
<?php
 //如果b.php被其他目錄里的a.php文件require 或者 include 去引用的話 require_once("./c.php"); 
 //實(shí)際上調(diào)用的是a.php目錄下的c.php require_once(dirname(__FILE__)."/c.php"); 
 //實(shí)際上調(diào)用的是b.php目錄下的c.php require_once("c.php"); 
 //實(shí)際上調(diào)用的是b.php目錄下的c.php
?>

案例三:

運(yùn)行php網(wǎng)站,出錯,內(nèi)容如下:

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'E:/php/www/mrsoft/注冊登錄模塊/index.php' (include_path='.;C:/php5/pear') in Unknown on line 0

解決方法:

apache不能解析上圖中“注冊登錄模塊”的中文URL,把它換成英文路徑即可。

總結(jié):

關(guān)于failed to open stream: No such file or directory出現(xiàn)的問題,大體就分為這3大類型。如果你也遇到了這樣的報錯,你可以仔細(xì)比對屬于哪個類型的錯誤。根據(jù)上面的提示和解決辦法處理,相信很快就能解決問題。


請登錄后查看

CRMEB-慕白寒窗雪 最后編輯于2023-05-17 18:32:17

快捷回復(fù)
回復(fù)
回復(fù)
回復(fù)({{post_count}}) {{!is_user ? '我的回復(fù)' :'全部回復(fù)'}}
排序 默認(rèn)正序 回復(fù)倒序 點(diǎn)贊倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level }}

作者 管理員 企業(yè)

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推薦': '推薦'}}
{{item.is_suggest == 1? '取消推薦': '推薦'}}
沙發(fā) 板凳 地板 {{item.floor}}#
{{item.user_info.title || '暫無簡介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
打賞
已打賞¥{{item.reward_price}}
{{item.like_count}}
{{item.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回復(fù) {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
打賞
已打賞¥{{itemc.reward_price}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)
查看更多
打賞
已打賞¥{{reward_price}}
5526
{{like_count}}
{{collect_count}}
添加回復(fù) ({{post_count}})

相關(guān)推薦

快速安全登錄

使用微信掃碼登錄
{{item.label}} 加精
{{item.label}} {{item.label}} 板塊推薦 常見問題 產(chǎn)品動態(tài) 精選推薦 首頁頭條 首頁動態(tài) 首頁推薦
取 消 確 定
回復(fù)
回復(fù)
問題:
問題自動獲取的帖子內(nèi)容,不準(zhǔn)確時需要手動修改. [獲取答案]
答案:
提交
bug 需求 取 消 確 定
打賞金額
當(dāng)前余額:¥{{rewardUserInfo.reward_price}}
{{item.price}}元
請輸入 0.1-{{reward_max_price}} 范圍內(nèi)的數(shù)值
打賞成功
¥{{price}}
完成 確認(rèn)打賞

微信登錄/注冊

切換手機(jī)號登錄

{{ bind_phone ? '綁定手機(jī)' : '手機(jī)登錄'}}

{{codeText}}
切換微信登錄/注冊
暫不綁定
CRMEB客服

CRMEB咨詢熱線 咨詢熱線

400-8888-794

微信掃碼咨詢

CRMEB開源商城下載 源碼下載 CRMEB幫助文檔 幫助文檔
返回頂部 返回頂部
CRMEB客服