用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1910|回复: 1
收起左侧

[讨论/交流] 微信 接入

[复制链接]
发表于 2014-9-27 16:25:56 | 显示全部楼层 |阅读模式
为什么 $token = TOKEN;        $signature = $this->input->get('signature');
        $timestamp = $this->input->get('timestamp');
        $nonce = $this->input->get('nonce');
        $tmp_arr = array($token, $timestamp, $nonce);
        sort($tmp_arr);
        $tmp_str = implode($tmp_arr);
        $tmp_str = sha1($tmp_str);        
        return ($tmp_str == $signature) 都验证通过了 执行了到if ($this->_valid())
        {
            // 判读是不是只是验证

            $echostr = $this->input->get('echostr');

                            echo $echostr;
                       file_put_contents('datacache_must/'.$echostr.'.txt',TOKEN);

                           exit;

           /* if (!empty($echostr))
            {
                //$this->load->view('valid_view', array('output' => $echostr));

            }
            else
            {
                // 实际处理用户消息
                $this->_responseMsg();
            } */
        }
        else
        {   
            $this->load->view('valid_view', array('output' => 'Error!'));
        }
可以生产了缓存 怎么我提交的时候,老是说没有响应TOKEN 提交不成功

发表于 2014-9-28 09:06:45 | 显示全部楼层
可以生产了缓存?什么意思?一般来说你只要url设置对了都能提交成功

本版积分规则