token驗證失敗了
define("TOKEN", "php"); ?
serialVersionUID;
? ? ? ? $signature = $_GET["signature"];
? ? ? ? $timestamp = $_GET["timestamp"];
? ? ? ? $nonce = $_GET["nonce"];
$token = TOKEN;
$tmpArr = array($token, $timestamp, $nonce);
? ? ? ? // use SORT_STRING rule
sort($tmpArr);
$tmpStr = implode('', $tmpArr );
$tmpStr = sha1( $tmpStr );
if( $tmpStr == $signature ){
echo $_GET['echostr'];
? ? ? ? // exit;
?}
echo "aa";
?>
老師,這個是我服務(wù)器上的代碼。
2015-10-16
我的也出現(xiàn)問題了!代碼跟老師講的一樣!
2015-10-17
要看是否開啟開發(fā)者模式 這個代碼有問題哦? if($tmpStr == $signature)? 只能輸出echo $_GET['echostr']; 就結(jié)束驗證
2016-05-14
token是在哪獲取的?
2015-10-16
我也試了老師那個,也不對