php如何安装soap扩展-LMLPHP

推荐:《PHP视频教程

安装 SOAP 扩展

对于 Windows 平台,需要在 php.ini 中加入如下代码:

extension = php_soap.dll
登录后复制

上面的工作完成之后,还需要注意的是 SOAP 扩展在配置文件中有独立的代码片段:

[soap]
; Enables or disables WSDL caching feature.
; http://php.net/soap.wsdl-cache-enabled
soap.wsdl_cache_enabled=1
; Sets the directory name where SOAP extension will put cache files.
; http://php.net/soap.wsdl-cache-dir
soap.wsdl_cache_dir="D:/wamp/tmp"
; (time to live) Sets the number of second while cached file will be used
; instead of original one.
; http://php.net/soap.wsdl-cache-ttl
soap.wsdl_cache_ttl=86400
; Sets the size of the cache limit. (Max. number of WSDL files to cache)
soap.wsdl_cache_limit = 5
登录后复制

这些配置项主要是用来指定 PHP 处理 WSDL 文件时使用缓存的行为。这几个配置项分别说明:是否开启 WSDL 文件缓存、文件缓存位置、缓存时间、以及最大缓存文件数量。启用缓存会加快 PHP 处理 WSDL 文件的速度,但最好在调试代码时关闭缓存,以避免一些因缓存行为而出现的问题。

以上就是php如何安装soap扩展的详细内容,更多请关注Work网其它相关文章!

08-31 13:18