php安裝soap擴展的方法:首先打開“php.ini”文件;然后添加代碼為“extension = php_soap.dll”;最后修改soap配置項并保存即可。
推薦:《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 文件緩存、文件緩存位置、緩存時間、以及最大緩存文件數(shù)量。啟用緩存會加快 PHP 處理 WSDL 文件的速度,但最好在調(diào)試代碼時關(guān)閉緩存,以避免一些因緩存行為而出現(xiàn)的問題。