我正在尝试使用SOAP,我正在学习本教程: http://www.codewalkers.com/c/a/Miscellaneous/Using-SOAP-with-PHP/3/
据我所知,我已经安装了所有需要的东西。
soap
Soap Client enabled
Soap Server enabled
Directive Local Value Master Value
soap.wsdl_cache 1 1
soap.wsdl_cache_dir /tmp /tmp
soap.wsdl_cache_enabled 1 1
soap.wsdl_cache_limit 5 5
soap.wsdl_cache_ttl 86400 86400
当我尝试运行以下代码时,我得到以下错误
<?php
function getStockQuote($symbol) {
mysql_connect("localhost", "username", "password");
mysql_select_db('captainc_general');
$query = "SELECT stock_price FROM stockprices "
. "WHERE stock_symbol = '$symbol'";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
return $row['stock_price'];
}
require_once('nusoap.php'); //use the nusoap library
$server = new soap_server();
$server->configureWSDL('stockserver', 'urn:stockquote');
$server->register("getStockQuote",
array('symbol' => 'xsd:string'),
array('return' => 'xsd:decimal'),
'urn:stockquote',
'urn:stockquote#getStockQuote');
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA)
? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>
警告:require_once(nusoap.php)[function.require-once]:无法打开流:第17行/home/captainc/public_html/soap/soaptest.php中没有此类文件或目录
致命错误:require_once()[function.require]:在/ home /中打开所需的'nusoap.php'(include_path ='。:/ usr / lib / php:/ usr / local / lib / php')失败第17行上的captainc / public_html / soap / soaptest.php
任何人都有任何想法我需要做些什么才能对此进行排序?