...
|
...
|
@@ -212,7 +212,7 @@ class SalesmangoodsController extends WeChatBaseController{ |
|
|
|
|
|
public function text(){
|
|
|
|
|
|
dump(cache('urll'));
|
|
|
dump(cache('__FILE__'));
|
|
|
dump(cache('2222'));
|
|
|
dump(cache('pppp'));
|
|
|
dump(cache('ppp'));
|
...
|
...
|
@@ -230,11 +230,12 @@ class SalesmangoodsController extends WeChatBaseController{ |
|
|
$access_token=$this->getAccessToken();
|
|
|
$filepath = $_POST['mediaId'];
|
|
|
$str = date('YmdHis').mt_rand('100','999').'.png';
|
|
|
$targetName = '/uploads/'.$str;
|
|
|
$targetName = $str;
|
|
|
cache('urll',$targetName);
|
|
|
$access_token = $access_token['accessToken'];
|
|
|
$file = file_get_contents("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
|
|
|
cache('2222',$file);
|
|
|
cache('__FILE__',__FILE__);
|
|
|
file_put_contents($targetName,$file);
|
|
|
|
|
|
|
...
|
...
|
|