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

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

failed to open stream: No such file or directory問(wèn)題解決大全

管理 管理 編輯 刪除

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

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

案例一

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

原因及解決方法

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

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

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

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

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

案例二

問(wèn)題就是:

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時(shí)加上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)站,出錯(cuò),內(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/注冊(cè)登錄模塊/index.php' (include_path='.;C:/php5/pear') in Unknown on line 0

解決方法:

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

總結(jié):

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


請(qǐng)登錄后查看

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 || item.bbs_level }}

作者 管理員 企業(yè)

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

{{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}}
5719
{{like_count}}
{{collect_count}}
添加回復(fù) ({{post_count}})

相關(guān)推薦

快速安全登錄

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

微信登錄/注冊(cè)

切換手機(jī)號(hào)登錄

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

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

CRMEB咨詢熱線 咨詢熱線

400-8888-794

微信掃碼咨詢

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