正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
@@ -240,9 +240,10 @@ class SalesmangoodsController extends WeChatBaseController{ | @@ -240,9 +240,10 @@ class SalesmangoodsController extends WeChatBaseController{ | ||
240 | $str = 'uploads/'.date('YmdHis').time().rand('1000000','99999999').'.png'; | 240 | $str = 'uploads/'.date('YmdHis').time().rand('1000000','99999999').'.png'; |
241 | $targetName = $str; | 241 | $targetName = $str; |
242 | $access_token = $access_token['accessToken']; | 242 | $access_token = $access_token['accessToken']; |
243 | - $file = file_get_contents("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath"); | 243 | + $url = "http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath"; |
244 | +// $file = file_get_contents("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath"); | ||
245 | + $file = $this->httpGet($url); | ||
244 | file_put_contents($targetName,$file); | 246 | file_put_contents($targetName,$file); |
245 | -// $msg["filename"] = cmf_get_image_url($str); | ||
246 | $msg["filename"] = '/'.$str; | 247 | $msg["filename"] = '/'.$str; |
247 | return json_encode($msg); | 248 | return json_encode($msg); |
248 | 249 |
-
请 注册 或 登录 后发表评论