php 微信公众号总是配置失败 需要返回 echostr变量 而不是true

<?php



$signature = $_GET["signature"];
$timestamp = $_GET["timestamp"];
$nonce = $_GET["nonce"];
$token = 'ssss';
$tmpArr = array($token, $timestamp, $nonce);
sort($tmpArr, SORT_STRING);
$tmpStr = implode( $tmpArr );
$tmpStr = sha1( $tmpStr );

if( $tmpStr == $signature ){
    echo $_GET['echostr'];
}else{
    return false;
}

 

posted @ 2020-04-16 18:19  酷酷的城池  阅读(471)  评论(0编辑  收藏  举报