...
|
...
|
@@ -213,6 +213,10 @@ class SalesmangoodsController extends WeChatBaseController{ |
|
|
public function text(){
|
|
|
|
|
|
dump(cache('msgssss'));
|
|
|
dump(cache('a1'));
|
|
|
dump(cache('a2'));
|
|
|
dump(cache('a3'));
|
|
|
dump(cache('a4'));
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
@@ -227,9 +231,13 @@ class SalesmangoodsController extends WeChatBaseController{ |
|
|
$targetName = '/uploads/'.$str;
|
|
|
cache('msgssss',$targetName);
|
|
|
$ch = curl_init("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
|
|
|
cache('a1',1111);
|
|
|
$fp = fopen($targetName, 'wb');
|
|
|
cache('a2',2222);
|
|
|
curl_setopt($ch, CURLOPT_FILE, $fp);
|
|
|
cache('a3',3333);
|
|
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
|
|
cache('a4',4444);
|
|
|
$msg["status"] = curl_exec($ch);
|
|
|
$msg["filename"] = $str;
|
|
|
curl_close($ch);
|
...
|
...
|
|