php-PHP下xml无法正常取值

WBOY
Release: 2016-06-02 11:28:38
Original
800 people have browsed it

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
)

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

Related labels:
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!