微信设置提交提示token验证失败
请问token验证失败是哪里的问题
代码如下:
$timestamp = $_GET['timestamp'];
$nonce = $_GET['nonce'];
$token = 'xiexie';
$signature = $_GET['signature'];
$array = ();
$array = $array($timestamp,$nonce,$token);
sort($array);
$tmpstr = implode('',$array);
$tmpstr = sha1($tmpstr);
if($tmpstr == $signature){
echo $_GET['echostr'];
exit;
}