我以前能提交成功現在為什么不行了?
<?php
namespace Home\Controller;
use Common\Model\ShowModel;
use Think\Controller;
class IndexController extends Controller {
? ? public function index(){
? ? ? ? $nonce =$_GET['nonce'];
? ? ? ? $token ='18817797900';
? ? ? ? $timestamp=$__GET['timestamp'];
? ? ? ? $echostr=$__GET['echostr'];
? ? ? ? $signature=$__GET['signature'];
? ? ? ? //形成數組,然后按字典排序
? ? ? ? $array = array();
? ? ? ? $array = array($nonce,$timestamp,$token);
? ? ? ? sort($array);
? ? ? ? $str = sha1(implode('',$array));
? ? ? ? if($str ==$signature){
? ? ? ? ? ? echo $echostr;
? ? ? ? ? ? exit;
? ? ? ? }
? ? ? ??
? ? }
? ? public function reponseMsg(){
? ? ? ? $postArr = $GLOBALS['HTTP_RAW_POST_DATA'];
? ? }
}
2018-07-01
查看文件編碼
必須是utf-8連utf-8+DOM都不行
2017-10-09
$echostr=$__GET['echostr'];
$echostr=$__GET['echostr']; 有這句啊 沒問題啊
2017-10-08
$echostr=$__GET['echostr'];