We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 版本: overtrue/wechat 版本: "overtrue/wechat": "~3.1"
描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段
` $server = $this->app->server;
$server->setMessageHandler(function ($message) { return "您好!欢迎关注我!"; }); $server->serve()->send();
微信debug <xml> <ToUserName> <![CDATA[o4aeVxBRVSHGy0mHpXvKHVEHTIPE]]> </ToUserName> <FromUserName> <![CDATA[gd_2123132456]]> </FromUserName> <CreateTime>1470360550</CreateTime> <MsgType> <![CDATA[text]]> </MsgType> <Content> <![CDATA[您好!欢迎关注我!]]> </Content> </xml>
<xml> <ToUserName> <![CDATA[o4aeVxBRVSHGy0mHpXvKHVEHTIPE]]> </ToUserName> <FromUserName> <![CDATA[gd_2123132456]]> </FromUserName> <CreateTime>1470360550</CreateTime> <MsgType> <![CDATA[text]]> </MsgType> <Content> <![CDATA[您好!欢迎关注我!]]> </Content> </xml>
另外$server->serve()->send();
Content内容怎么多了 是不是格式不对呢?
The text was updated successfully, but these errors were encountered:
要不你有空学习一下 XML?
Sorry, something went wrong.
好的, 另外FromUserName 和ToUserName 是否对调了呢,要手动指定么? $server->serve()->send(); 在微信debug调试上回复的是上面的xml ,导致在微信上没收到消息。 是上面那个xml的格式问题么。我对比了一下Content 多了<![CDATA[ !];
问题已解决,弄错了!! @overtrue 感谢这么好的应用扩展
No branches or pull requests
我用的环境
PHP 版本:
overtrue/wechat 版本: "overtrue/wechat": "~3.1"
微信的消息回复的FromUserName和ToUserName是不是对调了
描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段
`
$server = $this->app->server;
$server->setMessageHandler(function ($message) {
return "您好!欢迎关注我!";
});
$server->serve()->send();
微信debug
<xml> <ToUserName> <![CDATA[o4aeVxBRVSHGy0mHpXvKHVEHTIPE]]> </ToUserName> <FromUserName> <![CDATA[gd_2123132456]]> </FromUserName> <CreateTime>1470360550</CreateTime> <MsgType> <![CDATA[text]]> </MsgType> <Content> <![CDATA[您好!欢迎关注我!]]> </Content> </xml>
另外$server->serve()->send();
Content内容怎么多了 是不是格式不对呢?
The text was updated successfully, but these errors were encountered: