微信設置提交提示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;
}
2016-09-01
$array ? ? = $array($timestamp,$nonce,$token);
應該寫成
$array ? ? = array($timestamp,$nonce,$token);
第二個array多了一個$符號