微信接口配置需要用到https开头的域名,然后将路径填写正确 如下
![image.png](https://i-blog.csdnimg.cn/blog_migrate/a161d5b4ee62c7b44743af73f193016a.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;
}
然后再次保存接口配置信息就可以了。