如有任何建议、提示或提示,我将不胜感激。
显示" Configuration failed ";在微信沙盒环境中提交我的URL和Token后弹出。谁能建议调试或找到解决方案的方法?以下是详细信息:
- 运行Heroku服务器并使用Heroku生成的URL。
- 将文档中的示例代码推送到这里
- 遵循youtube教程,复制代码并尝试。
<?php $data[] = 'Test123'; $data[] = $_GET['timestamp']; $data[] = $_GET['nonce']; asort($data); $strData = ''; $d = ''; $authString = ''; foreach($data as $d){ $authString .= $d; } //verify the signture if(sha1($authString) == $_GET[signature]){ //check if the echostr if(!empty($_GET['echostr'])){ echo $_GET['echostr']; die(); }else{ //logic goes here $return = '<xml> <ToUserName><![CDATA['.$toUser.']]></ToUserName> <FromUserName><![CDATA['.$fromUser.']]></FromUserName> <CreateTime>'.time().'</CreateTime> <MsgType><![CDATA[text]]></MsgType> <Content><![CDATA['.$text.']]></Content> <FuncFlag>0</FuncFlag> </xml>'; echo $return; } }else{ die('You are not supposed to be here'); } ?>
- 检查了日志,发现它工作正常,但是当我在微信沙盒上提交URL和令牌时没有显示任何活动。
- 已经尝试了不同的URL变体,从使用根URL到完成php文件(如xxxx/responder.php )
- 提交的令牌匹配代码中使用的令牌。 上传原始php到服务器,劫持了heroku php hello world应用程序的文档代码或youtube代码。
代码本身直接来自微信文档或Youtube视频。如果我能提供任何额外的信息,请告诉我。
请检查。《国际》打破了沙盒环境。现在应该解决这个问题。请重新测试