Home > Article > Backend Development > Example sharing of PHP publishing WebService
Web service is a platform-independent, low-coupling, self-contained, programmable web-based application. This article mainly shares with you examples of PHP publishing WebService, hoping to help everyone.
//发布WebService soap_defencoding = 'UTF-8'; $server->decode_utf8 = false; $server->xml_encoding = 'UTF-8'; $server->configureWSDL('mysoapServer');//打开wsdl支持 $server->register( 'ssoRegister', //方法名 array("unixname"=>"xsd:string"), array("return"=>"xsd:string")); //isset 检测变量是否设置 $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; //service 处理客户端输入的数据 $server->service($HTTP_RAW_POST_DATA); ?>
soap_defencoding = 'UTF-8'; $client->decode_utf8 = false; $client->xml_encoding = 'UTF-8'; $paras=array('unixname'=>'dyh'); $checkResult=$client->call('ssoRegister',$paras); ?>
Note: Please click to open the link to download the nusoap.php file
Related recommendations:
JS and WebService large file upload code sharing
Detailed explanation of Nodejs calling WebService
Detailed explanation of php creating and calling webservice interface instance
The above is the detailed content of Example sharing of PHP publishing WebService. For more information, please follow other related articles on the PHP Chinese website!