나는 내가 HTML 출력이 $가을 초래할 수있는 방법 간단한 클라이언트HTML로 WSDL 요청의 결과를 출력하는 방법은 무엇입니까?
<?php
$client = new SoapClient("http://www.webservicex.net/geoipservice.asmx?WSDL");
$result = $client->GetGeoIPContext();
var_dump($result);
print $result; // Issue: Catchable fatal error: Object of class stdClass could not be converted to string
?>
을 썼다?
위해서 var_dump 결과 :
object(stdClass)[2]
public 'GetGeoIPContextResult' =>
object(stdClass)[3]
public 'ReturnCode' => int 1
public 'IP' => string '62.122.245.38' (length=13)
public 'ReturnCodeDetails' => string 'Success' (length=7)
public 'CountryName' => string 'Russian Federation' (length=18)
public 'CountryCode' => string 'RUS' (length=3)
'var_dump'의 출력 기능 :
은 또한 당신이 먼저 성공 여부를 확인할 수 있습니다? HTML 요소가 어떤 값으로 인쇄되고 싶습니까? – Havelock나는 ip, CountryName, CountryCode 및 그 값을 출력해야합니다. – BKI