您的位置:首页 > 移动开发 > 微信开发

php微信的文本回复功能开发

2017-08-23 17:51 417 查看
if( strtolower( $postObj->MsgType) == 'text'){
if ($postObj->Content =='test'){
$msgType  =  'text';
$content  ='你输入的为test';
$template = "<xml>
<ToUserName><![CDATA[%s]]></ToUserName>
<FromUserName><![CDATA[%s]]></FromUserName>
<CreateTime>%s</CreateTime>
<MsgType><![CDATA[%s]]></MsgType>
<Content><![CDATA[%s]]></Content>
</xml>";
$info     = sprintf($template, $toUser, $fromUser, $time, $msgType, $content);
echo $info;
}
}

关注触发事件查看本博客的其它关于微信开发的文章。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: