为了账号安全,请及时绑定邮箱和手机立即绑定

我以前能提交成功现在为什么不行了?

<?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'];

    }

}


正在回答

5 回答

亲,能不能把你代码跟异常贴出来看看。

feaksboigpfty

0 回复 有任何疑惑可以回复我~

查看文件编码

必须是utf-8连utf-8+DOM都不行

0 回复 有任何疑惑可以回复我~

$echostr=$__GET['echostr'];

$echostr=$__GET['echostr']; 有这句啊 没问题啊

0 回复 有任何疑惑可以回复我~

$echostr=$__GET['echostr'];

0 回复 有任何疑惑可以回复我~
#1

西红柿卫士 提问者

$echostr=$__GET['echostr']; $echostr=$__GET['echostr']; 有这句啊 没问题啊
2017-10-09 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

我以前能提交成功现在为什么不行了?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信