当前位置:Gxlcms > PHP教程 > php-PHP下xml无法正常取值

php-PHP下xml无法正常取值

时间:2021-07-01 10:21:17 帮助过:4人阅读

phpxml

输入数据:
$xml=SimpleXMLElement Object
(
[URL] => http://test.net/index.php?m=home&c=index&a=test
[ToUserName] => touser
[FromUserName] => fromuser
[CreateTime] => 20160129
[MsgType] => text
[Content] => test_message
[MsgId] => 01
)
$t=$xml->FromUserName;
print_r($t);
结果是:
SimpleXMLElement Object
(
[0] => fromuser
)

取不到值。实在无解求帮助。

人气教程排行