Commit 597e2351 authored by 734642908@qq.com's avatar 734642908@qq.com

token

parent 034d983a
......@@ -58,14 +58,14 @@ class WechatController extends BaseController
}
}
public function gettest()
public function getToekn()
{
$filepath = 'http://ylc.test.llewan.com/wechat/getToekn';
$filepath = 'http://ylc.test.llewan.com/wechat/reToekn';
$token = file_get_contents($filepath);
var_dump($token);exit;
return $token;
}
public function getToekn() {
public function retToekn() {
$filepath = 'uploadfile/wechatToken.txt';
$url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$this->appid.'&secret='.$this->secret;
......@@ -82,7 +82,8 @@ var_dump($token);exit;
$token = file_get_contents($url);
file_put_contents($filepath,$token);
}
return $token;
$token = file_get_contents($filepath);
echo $token;
}
//o1SKVdH2mEU_7FpCo3xdQ-kjVp94eesikR3lU9rkUoqCTvTHZhSxDsw9PtSB38Jf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment