-
-
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
素材管理 -- 部分图片下载失败 #13
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下载图片出现如下错误 :
有的图片能下载,有的图片不能下载的情况。
错误如下:
[2015-05-04 10:47:47] local.ERROR: exception 'ErrorException' with message 'Undefined offset: 1' in /var/www/meishenghuo/web/vendor/overtrue/wechat/src/Wechat/Utils/Http.php:228
我的解决方法如下,但是不知道这样做对不(能解决部分图片不能下载问题)。
Wechat\Utils\Http.php的 request() 方法下 :
$responseSplit = preg_split('/((?:\r?\n){2})/', $response['response']);
正则分割 header和 body的时候出现了 body被拆分成两部分的情况(本该是
结果变成$responseSplit = array(0=>"header信息", 1=>"body信息");
$responseSplit = array(0=>"header信息", 1=>"body1信息", 2=>"body2信息");
)。$responseSplit = preg_split('/((?:\r\n){2})/', $response['response']);
The text was updated successfully, but these errors were encountered: