...
|
...
|
@@ -224,7 +224,7 @@ class SalesmangoodsController extends WeChatBaseController{ |
|
|
$access_token=$this->getAccessToken();
|
|
|
$filepath = $_POST['mediaId'];//文件的绝对路径
|
|
|
$str = date('YmdHis').mt_rand('100','999').'.jpg';
|
|
|
$targetName = '/uploads/'.date('Ymd').'/'.$str;
|
|
|
$targetName = '/uploads/'.$str;
|
|
|
$ch = curl_init("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
|
|
|
$fp = fopen($targetName, 'wb');
|
|
|
curl_setopt($ch, CURLOPT_FILE, $fp);
|
...
|
...
|
|