string(267) "HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=BDED71">
时间:2021-07-01 10:21:17 帮助过:13人阅读
$xml_string = ""; $xml = simplexml_load_string($xml_string); //对象转换成数组,方便引用 $arr = (array)$xml; var_dump($arr); 0 -1100.0
$ar = simplexml_load_string($data['body']);
$ar = simplexml_load_string($data['body']);
我还不至于犯这个低级错误
不知道你会犯什么样的高级错误
$s = 'SimpleXMLElement Object';$xml = simplexml_load_string($s);print_r($xml); 0 -1100.0
不知道你会犯什么样的高级错误
$s = 'SimpleXMLElement Object';$xml = simplexml_load_string($s);print_r($xml); 0 -1100.0
贴出接收到的数据的序列化值
比如你接受的的数据在 $data 中,则
echo serialize($data);
贴出结果
贴出接收到的数据的序列化值
比如你接受的的数据在 $data 中,则
echo serialize($data);
贴出结果
a:2:{s:6:"header";s:267:"HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=96B4D5E802AEBBE6A1F92824C576690B; Path=/sdkproxy/; HttpOnly
Content-Type: text/html;charset=UTF-8
Content-Language: en-GB
Content-Length: 103
Date: Sat, 24 Aug 2013 03:22:14 GMT
Connection: close";s:4:"body";s:103:"
我感觉是数据的问题
$s = 'a:2:{s:6:"header";s:267:"HTTP/1.1 200 OKServer: Apache-Coyote/1.1Set-Cookie: JSESSIONID=96B4D5E802AEBBE6A1F92824C576690B; Path=/sdkproxy/; HttpOnlyContent-Type: text/html;charset=UTF-8Content-Language: en-GBContent-Length: 103Date: Sat, 24 Aug 2013 03:22:14 GMTConnection: close";s:4:"body";s:103:"SimpleXMLElement Object";}';$d = unserialize($s);$xml = simplexml_load_string(trim($d['body']));print_r($xml); 0 -1100.0
$s = 'a:2:{s:6:"header";s:267:"HTTP/1.1 200 OKServer: Apache-Coyote/1.1Set-Cookie: JSESSIONID=96B4D5E802AEBBE6A1F92824C576690B; Path=/sdkproxy/; HttpOnlyContent-Type: text/html;charset=UTF-8Content-Language: en-GBContent-Length: 103Date: Sat, 24 Aug 2013 03:22:14 GMTConnection: close";s:4:"body";s:103:"SimpleXMLElement Object";}';$d = unserialize($s);$xml = simplexml_load_string(trim($d['body']));print_r($xml); 0 -1100.0