$_GET不到值
页面能访问。并且加上else能输出,查看原因是$_GET不到值?求解!!!!
<?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发现里面没有值!!