正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
@@ -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 |
-
请 注册 或 登录 后发表评论