if(strtolower($postObj->MsgType) == 'text'){ if($postObj->Content == '你好'){ $template = "<xml> <ToUserName><![CDATA[%s]]></ToUserName> <FromUserName><![CDATA[%s]]></FromUserName> <CreateTime>%s</CreateTime> <MsgType><![CDATA[%s]]></MsgType> <Content><![CDATA[%s]]></Content> </xml>" $fromUser = $postObj->ToUserName; $toUser = $postObj->FromUserName; $time = time(); $content = "您好,感谢您的关注!"; $msgType = 'text'; $info = sprintf($template,$toUser,$fromUser,$time,$msgType,$content); echo $info; } }
- 3 回答
- 0 关注
- 1850 浏览
添加回答
举报
0/150
提交
取消