我有这段代码:
try { $oClient = new SoapClient('http://www.webservicex.net/CurrencyConvertor.asmx?WSDL'); $mResponse = $oClient->__soapCall( 'ConversionRate', array( 'FromCurrency' => 'USD', 'ToCurrency' => 'EUR' ) ); echo print_r($mResponse,1); } catch (SoapFault $fault) { trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR); }
我得到的结果总是为零:
stdClass Object ( [ConversionRateResult] => 0 )
有人可以帮我解决这个问题吗?