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

74

@@ -212,11 +212,11 @@ class SalesmangoodsController extends WeChatBaseController{ @@ -212,11 +212,11 @@ class SalesmangoodsController extends WeChatBaseController{
212 212
213 public function text(){ 213 public function text(){
214 214
215 - dump(cache('gg'));  
216 - dump(cache('pp'));  
217 - dump(cache('oo'));  
218 - dump(cache('ii'));  
219 - dump(cache('uu')); 215 + dump(cache('ggp'));
  216 + dump(cache('ppp'));
  217 + dump(cache('oop'));
  218 + dump(cache('iip'));
  219 + dump(cache('uup'));
220 220
221 } 221 }
222 222
@@ -229,15 +229,15 @@ class SalesmangoodsController extends WeChatBaseController{ @@ -229,15 +229,15 @@ class SalesmangoodsController extends WeChatBaseController{
229 $filepath = $_POST['mediaId'];//文件的绝对路径 229 $filepath = $_POST['mediaId'];//文件的绝对路径
230 $str = date('YmdHis').mt_rand('100','999').'.jpg'; 230 $str = date('YmdHis').mt_rand('100','999').'.jpg';
231 $targetName = '/uploads/'.$str; 231 $targetName = '/uploads/'.$str;
232 - cache('gg',111); 232 + cache('ggp',111);
233 $ch = curl_init("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath"); 233 $ch = curl_init("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
234 - cache('pp',111); 234 + cache('ppp',111);
235 $fp = fopen($targetName, 'wb'); 235 $fp = fopen($targetName, 'wb');
236 - cache('oo',111); 236 + cache('oop',111);
237 curl_setopt($ch, CURLOPT_FILE, $fp); 237 curl_setopt($ch, CURLOPT_FILE, $fp);
238 - cache('ii',111); 238 + cache('iip',111);
239 curl_setopt($ch, CURLOPT_HEADER, 0); 239 curl_setopt($ch, CURLOPT_HEADER, 0);
240 - cache('uu',111); 240 + cache('uup',111);
241 $msg["status"] = curl_exec($ch); 241 $msg["status"] = curl_exec($ch);
242 $msg["filename"] = $str; 242 $msg["filename"] = $str;
243 curl_close($ch); 243 curl_close($ch);