0
執行一個curl請求後,我已經獲得了這樣的響應。CURL後PHP中的XML解析錯誤
<?xml version="1.0" encoding="utf-8"?>
<mp_response>
<response_element>
<merchantid>
36573dkjdkjds3987398
</merchantid>
<orderid>
1
</orderid>
<responsecode>
23
</responsecode>
<description>
Transaction Payout Completed
</description>
</response_element>
</mp_response>
但是當我使用功能,如
new SimpleXMLElement($xml_str);
simplexml_load_string($data)
等 我得到這樣
Start tag expected, '<' not found
錯誤我該怎麼辦?
你可以發佈你如何讀取數據出捲曲的代碼,這聽起來像你的字符串url編碼 – DevZer0
看起來你'$ xml_str'或'$ data'不包含任何XML。 – MrCode