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

来源:互联网 发布:网络销售应该怎么做 编辑:程序博客网 时间:2024/06/03 17:31



        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;            }        }

关注触发事件查看本博客的其它关于微信开发的文章。

阅读全文
0 0
原创粉丝点击