微信 接入
为什么 $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 提交不成功
可以生产了缓存?什么意思?一般来说你只要url设置对了都能提交成功
页:
[1]