Heim >Backend-Entwicklung >PHP-Tutorial >xml-微信开发遇到如下问题,怎麽办?PHP开发的。

xml-微信开发遇到如下问题,怎麽办?PHP开发的。

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-02 11:27:481178Durchsuche

xmlphp微信

warning: simplexml_load_string() expects parameter 2 to be a class name derived from SimpleXMLElement, 'SimplexXMLElement' given in textMsg.php on line 28

微信token验证成功,部分代码如下
$postStr=$GLOBALS["HTTP_RAW_POST_DATA"];//获取POST数据的一种方式

<code>//$postObj=simplexml_load_string($postStr,'SimplexXMLElement',LIBXML_NOCDATA);$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);//把 XML 字符串载入对象中,解析xml$fromUsername=$postObj->FromUserName;$toUsername=$postObj->ToUserName;$keyword=trim($postObj->Content);$magType->$postObj->MsgId;$CreateTime=intval($postObj->CreateTime);</code>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn