警告:DOMDocument :: load()[domdocument.load]:I / O警告:加载外部实体失败 [英] Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity

查看:1707
本文介绍了警告:DOMDocument :: load()[domdocument.load]:I / O警告:加载外部实体失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在本机使用XAMPP上运行的应用程序中使用这段php脚本:

I was using this piece of php script in a application running under over XAMPP on my local machine:

$dom = new DomDocument();
$filename = "library.xml";

if (!$dom->load($filename))
    die("Could not parse iTunes XML file: ".$filename);

然后,我尝试将此应用程序移动到WampServer而不成功,并显示以下警告:

Then i tried to move this application to a WampServer without success, with the following warning:

Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "file:///C:/wamp/www/parser/library.xml" in C:\wamp\www\parser\includes\libs\itunes_xml_parser.lib.php on line 111

错误中的这一行完全是加载行,它在早期版本的XAMPP中无瑕疵,现在在XAMPP 1.7上不起作用。 7

This line in the error is exactly the load line, which worked flawlessly in earlier versions of XAMPP and isn't working now on XAMPP 1.7.7

推荐答案

根据这个为什么你不尝试使用绝对路径为您的文件路径。

As per this why don't you try using an absolute path for your filepath.

另外我看到这个php文件位于在 C:\wamp\www\parser\includes\libs 中,library.xml正在 C:/ wamp / WWW /解析器/ 。这是否正确?

Also i see that this php file is located at C:\wamp\www\parser\includes\libs and library.xml is being searched at C:/wamp/www/parser/. Is this correct?

也可能您已经关闭了早期xampp安装中的警告/错误。请检查这个也可以。

It could also be possible that you had turned off warnings/errors in your earlier xampp installation.So check this also.

这篇关于警告:DOMDocument :: load()[domdocument.load]:I / O警告:加载外部实体失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆