警告: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.