Explorar el Código

CURLOPT_SAFE_UPLOAD should before CURLOPT_POSTFIELDS

see365 hace 8 años
padre
commit
192d2f6fd8
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      qywechat.class.php

+ 2 - 1
qywechat.class.php

@@ -272,10 +272,11 @@ class Wechat
 		curl_setopt($oCurl, CURLOPT_URL, $url);
 		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);
 		}
+		curl_setopt($oCurl, CURLOPT_POSTFIELDS,$strPOST);
+
 		$sContent = curl_exec($oCurl);
 		$aStatus = curl_getinfo($oCurl);
 		curl_close($oCurl);