Jelajahi Sumber

CURLOPT_SAFE_UPLOAD should before CURLOPT_POSTFIELDS

see365 8 tahun lalu
induk
melakukan
192d2f6fd8
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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);