コード例 #1
0
ファイル: WeiXin.class.php プロジェクト: lughong/test
 public static function getMsg()
 {
     $postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
     //记录信息
     if (self::$_debug) {
         Log::write("weixin:" . $postStr, "ERR", 3, "weixin");
     }
     //解析xml
     if (!empty($postStr)) {
         self::$_msg = (array) simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
         self::$_msgtype = strtolower(self::$_msg['MsgType']);
     }
     return self::$_msg;
 }