-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
素材管理 -- 图片下载失败 #12
Comments
@lazyou OK。多谢,重构的时候没注意 |
下载图片的时候我出现了另一个错误情况。大致原因是在 D:\xampp\htdocs\xampp\meishenghuo\vendor\overtrue\wechat\src\Wechat\Utils\Http.php的 request() 方法下 : |
是在处理哪个逻辑的时候? |
$media->download($mediaId, $filename); 下载临时素材到本地的时候。 |
今天我改完那个bug之后? |
今天改完的还没更新使用。我明天更新下再建个Issues反馈。 |
overtrue\wechat\src\Wechat\Media.php 的 download() 方法返回是空。
原因在 overtrue\wechat\src\Wechat\Http.php 的 request() 中
$contents = json_decode($response['data'], true);
$response['data']
并不是json格式,是图片资源。download()的返回值
return $filename ? $contents : file_put_contents($filename, $contents);
要对换下冒号两边的参数 :
return $filename ? file_put_contents($filename, $contents) : $contents;
The text was updated successfully, but these errors were encountered: