西红柿卫士
2017-09-29 10:22
<?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'];
}
}
查看文件编码
必须是utf-8连utf-8+DOM都不行
$echostr=$__GET['echostr'];
$echostr=$__GET['echostr']; 有这句啊 没问题啊
$echostr=$__GET['echostr'];
PHP实现微信公众平台开发—基础篇
101983 学习 · 149 问题
相似问题