收藏
回答

全网发布接入检测,返回普通文本消息不成功?

appid:wxb912852b25c94421


if ($msg['Content'] == 'TESTCOMPONENT_MSG_TYPE_TEXT') {
            $xml = "<xml><ToUserName><![CDATA[{$FromUserName}]]></ToUserName>
<FromUserName><![CDATA[{$ToUserName}]]></FromUserName>
<CreateTime>{$msg['CreateTime']}</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[TESTCOMPONENT_MSG_TYPE_TEXT_callback]]></Content>
</xml>";
            write_log($xml);
            $returnMsg = "";
            $errCode = $pc->encryptMsg($xml, $timestamp, $nonce, $returnMsg);
            write_log("响应code:" . $errCode);
            write_log("响应内容:" . $returnMsg);
            echo $returnMsg;
        }



最后一次编辑于  2021-03-15
回答关注问题邀请回答
收藏
登录 后发表内容
问题标签