Home >Backend Development >PHP Tutorial >simplexml_load_file超时报错,请问怎么得到这个错误

simplexml_load_file超时报错,请问怎么得到这个错误

WBOY
WBOYOriginal
2016-06-23 13:46:03967browse

simplexml_load_file超时报错,请问怎么处理这个错误,现在一报错就显示错误信息在页面上。

请问用哪种方式加载远程的xml链接好一点(国外的链接),感觉用simplexml_load_file经常报错。


回复讨论(解决方案)

我猜想是否会是编码问题,试着转换一下过来的XMLDATA呢?

$xml_data=iconv("utf-8","gb2312",$xml_data);//转换成gb2312

超时与编码有关系???编码都是UTF-8的

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn