還有一點再說一下,老師用的ftp連接軟件是WinSCP,代碼編寫軟件是Sublime Text 3,都是免費的不要錢的,搜一下就有。Sublime Text 3可能需要漢化和配置,可能需要科學(xué)上網(wǎng),搜一下按部就班去做就行了。工欲善其事必先利其器。
2020-01-22
sort($array);
//拼接成字符串,與signature校驗
$str = sha1( implode( $array ) );
if( $str == $signature){
echo $echostr;
exit;
}
}
public function show(){
echo 'weixin';
}
}
//拼接成字符串,與signature校驗
$str = sha1( implode( $array ) );
if( $str == $signature){
echo $echostr;
exit;
}
}
public function show(){
echo 'weixin';
}
}
2020-01-22
$nonce = $_GET['nonce'];
$token = 'shiyanpingtaitest';
$timestamp = $_GET['timestamp'];
$signature = $_GET['signature'];
$echostr = $_GET['echostr'];
//形成數(shù)組,按字典序排序并sha1加密
$array = array();
$array = array( $nonce, $timestamp, $token);
$token = 'shiyanpingtaitest';
$timestamp = $_GET['timestamp'];
$signature = $_GET['signature'];
$echostr = $_GET['echostr'];
//形成數(shù)組,按字典序排序并sha1加密
$array = array();
$array = array( $nonce, $timestamp, $token);
2020-01-22
indexContorller.class.php全代碼:
<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){
//獲得參數(shù) signature nonce timestamp token echostr
<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){
//獲得參數(shù) signature nonce timestamp token echostr
2020-01-22
ps3. 注意目錄,要加一個home。比如在 indexController.class.php后面寫了public function show后應(yīng)該瀏覽器進入https://123321123.aaaa.net/imooc.php/home/index/show,同理微信服務(wù)器地址就是https://123321123.aaaa.net/imooc.php/home/index/
2020-01-22
thinkphp3.2.3用下面代碼可以成功認(rèn)證:
ps1. 3.2.3的action類統(tǒng)一被換成controller類,所以不要找action文件夾而是找controller文件夾里的indexController.class.php,然后操作。
ps2. indexController.class.php里只能有一個public function index,所以應(yīng)該刪去自帶的展示的東西再修改。
ps1. 3.2.3的action類統(tǒng)一被換成controller類,所以不要找action文件夾而是找controller文件夾里的indexController.class.php,然后操作。
ps2. indexController.class.php里只能有一個public function index,所以應(yīng)該刪去自帶的展示的東西再修改。
2020-01-22
我來記錄一下吧,自己用的 laravel 框架學(xué)習(xí),關(guān)注時的事件推送一直接收不到,耗費很多時間才發(fā)現(xiàn),post 請求被 csrf middleware 攔截了,所以直接沒有請求到接口中,把這個接口寫在 csrf 的不檢測清單中就可以了。
2019-12-31
簡單說一下幾個坑吧
1.回復(fù)的xml里面要檢查有沒有空格
2.微信消息發(fā)送的是post請求,記得設(shè)置好路由
1.回復(fù)的xml里面要檢查有沒有空格
2.微信消息發(fā)送的是post請求,記得設(shè)置好路由
2019-11-22
我在判斷那里,改成isset($_GET['echostr'])就成功了
2019-08-03