Skip to content

Commit

Permalink
fix media upload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hpp592720620 committed Aug 5, 2016
1 parent ab0205c commit 84074b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qywechat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ private function http_post($url,$param,$post_file=false){
curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($oCurl, CURLOPT_POST,true);
curl_setopt($oCurl, CURLOPT_POSTFIELDS,$strPOST);
if(PHP_VERSION_ID >= 50500){
curl_setopt($oCurl, CURLOPT_SAFE_UPLOAD, FALSE);
}
$sContent = curl_exec($oCurl);
$aStatus = curl_getinfo($oCurl);
curl_close($oCurl);
Expand Down
3 changes: 3 additions & 0 deletions wechat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,9 @@ private function http_post($url,$param,$post_file=false){
curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($oCurl, CURLOPT_POST,true);
curl_setopt($oCurl, CURLOPT_POSTFIELDS,$strPOST);
if(PHP_VERSION_ID >= 50500){
curl_setopt($oCurl, CURLOPT_SAFE_UPLOAD, FALSE);
}
$sContent = curl_exec($oCurl);
$aStatus = curl_getinfo($oCurl);
curl_close($oCurl);
Expand Down

0 comments on commit 84074b7

Please sign in to comment.