1.开发的时候一定要关闭php soap的缓存,服务器和客户端都需要,不然会报 Fatal error: Uncaught SoapFault exception: [Client] Function (”test”) is not a valid method for this service in D:\xampp\htdocs\clien.php:5 Stack trace: #0 [internal function]: SoapClient->__call(’test’, Array) #1 D:\xampp\htdocs\clien.php(5): SoapClient->test() #2 {main}
服务器和客户端php 都需要通过这个方法来关闭缓存,如果报找不到方法可以通过var_dump($client->__getFunctions())
ini_set("soap.wsdl_cache_enabled", "0");
2.如果报不识别xml错误,请确保代码里没有空格等无关信息。
相关文章:
-
2022-12-23
-
2022-12-23
-
2021-04-03
-
2022-01-25
-
2021-06-06
-
2021-11-23
-
2021-09-10
-
2021-06-17