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

4

@@ -229,7 +229,7 @@ class SalesmangoodsController extends WeChatBaseController{ @@ -229,7 +229,7 @@ class SalesmangoodsController extends WeChatBaseController{
229 229
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 = 'uploads/'.mt_rand('100','999').'.png';
233 $targetName = $str; 233 $targetName = $str;
234 cache('urll',$targetName); 234 cache('urll',$targetName);
235 $access_token = $access_token['accessToken']; 235 $access_token = $access_token['accessToken'];
@@ -238,10 +238,6 @@ class SalesmangoodsController extends WeChatBaseController{ @@ -238,10 +238,6 @@ class SalesmangoodsController extends WeChatBaseController{
238 cache('__FILE__',__FILE__); 238 cache('__FILE__',__FILE__);
239 file_put_contents($targetName,$file); 239 file_put_contents($targetName,$file);
240 240
241 -  
242 - rename('20190618181700945.png','/uploads/text.jpg');  
243 -  
244 -  
245 /* $ch = curl_init("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath"); 241 /* $ch = curl_init("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
246 cache('pppp',$ch); 242 cache('pppp',$ch);
247 $fp = fopen($targetName, 'w'); 243 $fp = fopen($targetName, 'w');