我在使用simplexml_load_file
在php中閱讀xml。但是嘗試加載它顯示警告'xmlParseEntityRef:no name'在將xml加載到php文件時出現警告
Warning: simplexml_load_file() [function.simplexml-load-file]: <project orderno="6" campaign_name="International Relief & Development" project in /home/bluecard1/public_html/test.php on line 3
Warning: simplexml_load_file() [function.simplexml-load-file]:^in /home/bluecard1/public_html/test.php on line 3
Warning: simplexml_load_file() [function.simplexml-load-file]: http://..../index.php/site/projects/:15: parser error : xmlParseEntityRef: no name in /home/bluecard1/public_html/test.php on line 3
Warning: simplexml_load_file() [function.simplexml-load-file]: ional Relief & Development" project_id="313" client_name="International Relief & in /home/bluecard1/public_html/test.php on line 3
Warning: simplexml_load_file() [function.simplexml-load-file]:^in /home/bluecard1/public_html/test.php on line 3
Warning: simplexml_load_file() [function.simplexml-load-file]: http://..../index.php/site/projects/:15: parser error : xmlParseEntityRef: no name in /home/bluecard1/public_html/test.php on line 3
列表的XML我如何糾正消除這些警告?
(XML從URL http://..../index.php/site/projects
&加載到test.php的變量產生的。我沒有寫權限來的index.php)
的XML無效。您可能無法加載它。錯誤可以通過在'simplexml_load_file'前面添加'@'或者通過添加一個標誌來抑制,參見'simplexml_load_file'的手冊頁以獲得更多信息,並且請刪除你的問題,這是重複的。 – hakre
我可以看到,我的回答得到了很多關注,如果這實際上是解決方案:您能否將其標記爲「正確答案」?謝謝。 – ricricucit