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

WBOY
Release: 2016-06-23 13:46:03
Original
945 people have browsed it

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

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


回复讨论(解决方案)

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

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

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template