当前位置:首页 > 技术教程 > 脚本编程 > 正文内容

PHP微信开发-接口配置信息,入口文件Token配置失败解决办法

atao5年前 (2020-10-04)脚本编程5576

微信接口配置需要用到https开头的域名,然后将路径填写正确 如下

image.png

下面是index.php代码:

//设置接口配置信息
$timestamp = $_GET['timestamp'];
$nonce = $_GET['nonce'];
$token = 'weixin';  //在网页中配置的token
$signature = $_GET['signature'];
$array = array($timestamp,$nonce,$token);
$tmpstr= implode('',$array);
$tmpstr = sha1($tmpstr);
if ($tmpstr == $signature){
    echo $_GET['echostr'];
    exit;
}

然后再次保存接口配置信息就可以了。

扫描二维码推送至手机访问。

版权声明:本文由武景涛的博客发布,如需转载请注明出处。

本文链接:http://www.yizhanhongtu.cn/post/11.html

分享给朋友: