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