PHP로 실행되도록 SOAP 웹 서비스를 얻으려고합니다. 하지만 파일을 실행하면 페이지에 아무것도 표시되지 않습니다. 코드가 그런 식으로 실행되지만 함수가 실행되지 않는지 확인하기 위해 클라이언트를 만들려고했습니다. 다음은 내 코드입니다 :SOAP가있는 PHP의 웹 서비스
webservice.php
function hello(){
echo("hi");
}
$server = new SoapServer(null, array('uri'=>'http://localhost/FutureWB/hello'));
$server->addFunction("hello");
$server->handle();
testweb.php
try{
$client = new SoapClient(null, array(
'location'=>"http://localhost/FutureWB/functions/webservice.php",
'uri' => "http://localhost/FutureWB/hello"
));
$result = $client->hello();
echo($result);
}catch(SoapFault $ex){
$ex->getMessage();
}
확인 , 당신이 얻고있는 오류는 무엇입니까 – Satya
주어진 오류가 없습니다. 그냥 빈 페이지 –