public function token()
{
$token = \'token\';//微信-客服消息TOKEN(令牌)微信要更改的token必须是这个
$signature = $_GET["signature"];
$timestamp = $_GET["timestamp"];
$nonce = $_GET["nonce"];
$tmpArr = array($token, $timestamp, $nonce);
sort($tmpArr, SORT_STRING);
$tmpStr = implode($tmpArr);
$tmpStr = sha1($tmpStr);
if ($tmpStr == $signature) {
echo $_GET[\'echostr\'];
} else {
echo \'对不起,你程序出错了\';
}
}