$_GET不到值
頁面能訪問。并且加上else能輸出,查看原因是$_GET不到值?求解?。。。?/p>
<?php
//1.將timestamp,nonce,toke按字典順序排序
$timestamp?=?$_GET['timestamp'];
$nonce?=?$_GET['nonce'];
$token?=?'zhangjun';
$signature?=?$_GET['signature'];
$array?=?array($timestamp,$nonce,$token);
//2.將排序后的三個參數拼接之后用sha1加密
$tmpstr?=?implode('',$array);
$tmpstr?=?sha1($tmpstr);
//3.將加密后的字符串與signature進行對比,判斷該請求是否來自微信
if($tmpstr?==?$signature){
????header('content-type:text');
????echo?$_GET['echostr'];
????exit;
}else{
echo?123;
}頁面輸出123
經過查看,并且打印$_GET發現里面沒有值!!
2020-02-25
我也有同樣的問題?可以在公網訪問,但就是
$_GET['signature'],get不到值$_GET['echostr'],這兩個2017-05-15
你確定你的url能在公網訪問嗎?