PHP【soap】

阅读更多

1.php.ini里开启php_soap

extension=php_soap.dll
 

 

2.server.php

 'http://127.0.0.1/soap/test',
);

$server = new SoapServer(null, $options);

$server->setClass('test');

$server->handle();

 

3.client.php

 'http://127.0.0.1/soap/test',
	'location' => 'http://127.0.0.1/soap/server.php',
);

$client = new SoapClient(null, $options);

echo $client->hello();

 

4.测试

http://127.0.0.1/soap/client.php

你可能感兴趣的:(php,soap)