代码用的是curl接口方式传递参数,代码如下:
                  $header[]="Content-Type: text/xml; charset=utf-8";
$header[]="User-Agent: Apache/1.3.26 (Unix)";
$header[]="Host: 192.168.101.230";
$header[]="Connection: keep-alive";
$header[]="Content-Length: ".strlen($acContent);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $acContent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); //启用ssl方式
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$res = curl_exec($ch);
curl_close($ch);
return $res;
在apache2.2.8 php5.2.6版本下,能成功返回我想要的结果,而在apache2.2.14 php5.2.12版本下,返回如下错误:
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
 <HEAD>
  <TITLE>Apache Server Error
  </TITLE>
 </HEAD>
 <BODY>
  <H1>Apache Server Error</H1>
<p><strong>Failed to read POST data!< ><br>Please Email:<a href="mailto:[email protected]">Aspire Interface Support</a> for details.</p><H2>Content headers of the request</H2>
Accept: */*<br>Content-Type: text/xml; charset=utf-8<br>User-Agent: Apache/1.3.26 (Unix)<br>Host: 192.168.101.230<br>Connection: keep-alive<br>Content-Length: 802<br>Expect: 100-continue<br></BODY></HTML>有没有知道出现这种情况的原因是什么呀,google也很难找到类似的情况