Simplexml parsing error of php5. Read the simplexml parsing error of php5. some time ago, simplexml was used to parse an rss data source, and the desired result was obtained easily. I don't want to start reporting the error in a few days: Warning: simplexml_load_file () [function. simplexml-load-file]: inputco
A few days ago, simplexml was used to parse an rss data source, so it was easy to get the desired results. I don't want to start reporting errors in a few days:
Warning: simplexml_load_file () [function. simplexml-load-file]: input conversion failed due to input error, bytes 0xAD 0xB5 0x3C 0x2F
It was a bug in php5 at the beginning, but the search found that there may be a mix of other encoding characters in the rss source, resulting in simplexml parsing error.
That is to say, if the rss statement is like this:
Plain textxml:
So the rss content must be gb2312.
Solution
Iconv conversion encoding
Modify encoding to the correct encoding.