php 使用soap有两种方式。一、用wsdl文件服务器端。 soap_1_2));$server->setclass(service);$server->handle();?>资源描述文件,可以用工具(zend studio)生成。其实就是一个xml文件。 客户端调用add(1,2);?>二、不用wsdl文件服务器端 abcd));$server->setclass(service);$server->handle();?>客户端 http://localhost/interface/soap.php, uri => abcd, //资源描述符服务器和客户端必须对应 style => soap_rpc, use => soap_encoded )); echo $soap->add(1,2);}catch(exction $e){ echo print_r($e->getmessage(),true);}?>
版权声明:本文为博主原创文章,未经博主允许不得转载。
以上就介绍了webserver 两种模式,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。