1.在index模块的index控制器中写入index方法如下:
public function index()
{
$nonce = $_GET['nonce'];
$token = '*****';//此处改成你的token
$timestamp = $_GET['timestamp'];
$echostr = $_GET['echostr'];
$signature = $_GET['signature'];
$array = array();
$array = array($nonce,$timestamp,$token);
sort($array);
$str = sha1(implode('',$array));
if($str == $signature){
echo $echostr;
exit;
}
}
2.config.php中关闭调试模式,与trace。
3.