我正在使用读取PHP中的XML simplexml_load_file
。但是,在尝试加载xml时,它会显示警告列表
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是从url生成的,http://..../index.php/site/projects
并加载到test.php中的变量中。我没有将priveleges写入index.php)
@
在前面加上simplexml_load_file
或添加标志来抑制错误,simplexml_load_file
有关更多信息,请参见的手册页,请删除您的问题,它是重复的。