$xmldata='<?xml version="1.0" encoding="UTF-8"?>
<Root>
<PubInfo>
<Version>1.0</Version>  
<CompanyCode>310001</CompanyCode>
<Key>dsiuoiosjk</Key>
<MsgType>O</MsgType>    
<OptType>2</OptType> 
<Signature>ddddddd</CreatTime>
</PubInfo>
<DataInfo>
dddd
</DataInfo>
</Root>';
curl_setopt($curl, CURLOPT_HTTPHEADER, array("application/x-www-form-urlencoded","Content-type:text/xml"));curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $xmldata);
传过之后,返回非xml报文格式,如果把这个str输出后 用测试工具测试可以正常访问。。