http://my.oschina.net/cart/
class SoapClientNew extends SoapClient { public function __doRequest($request,$location,$action,$version,$one_way = 0) { $request = parent::__doRequest($request,$one_way); $start = strpos($request,'<soap');//根据实际情况做处理。。。,如果是<?xml开头,改成<?xml $end = strrpos($request,'>'); return substr($request,$start,$end-$start+1); } }调用:
$client = new SoapClientNew($url);完美解决! 原文链接:https://www.f2er.com/xml/298369.html