作者 anyv
1 个管道 的构建 通过 耗费 0 秒

1

@@ -212,7 +212,7 @@ class SalesmangoodsController extends WeChatBaseController{ @@ -212,7 +212,7 @@ class SalesmangoodsController extends WeChatBaseController{
212 212
213 public function text(){ 213 public function text(){
214 214
215 - dump(cache('urll')); 215 + dump(cache('__FILE__'));
216 dump(cache('2222')); 216 dump(cache('2222'));
217 dump(cache('pppp')); 217 dump(cache('pppp'));
218 dump(cache('ppp')); 218 dump(cache('ppp'));
@@ -230,11 +230,12 @@ class SalesmangoodsController extends WeChatBaseController{ @@ -230,11 +230,12 @@ class SalesmangoodsController extends WeChatBaseController{
230 $access_token=$this->getAccessToken(); 230 $access_token=$this->getAccessToken();
231 $filepath = $_POST['mediaId']; 231 $filepath = $_POST['mediaId'];
232 $str = date('YmdHis').mt_rand('100','999').'.png'; 232 $str = date('YmdHis').mt_rand('100','999').'.png';
233 - $targetName = '/uploads/'.$str; 233 + $targetName = $str;
234 cache('urll',$targetName); 234 cache('urll',$targetName);
235 $access_token = $access_token['accessToken']; 235 $access_token = $access_token['accessToken'];
236 $file = file_get_contents("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath"); 236 $file = file_get_contents("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
237 cache('2222',$file); 237 cache('2222',$file);
  238 + cache('__FILE__',__FILE__);
238 file_put_contents($targetName,$file); 239 file_put_contents($targetName,$file);
239 240
240 241