详细描述是,一个用其他程序的web 项目 想通过输入一些参数来获得php web项目上的数据(查询结果集),请问用什么方式呢。我选择web service但是传字符串还可以,传结果集还没有尝试过。我的代码如下: header("Content-Type:text/html;charset=gb2312");
include_once('./common.php');
@include_once (S_ROOT.'./source/nusoap.php');//插入文件
$server = new soap_server();
$server->configureWSDL('hellowsdl', 'urn:hellowsdl');
$server->wsdl->schemaTargetNamespace = 'urn:hellowsdl';
$server->register('hello', // method name
array('username'=>'xsd:string'), // input parameters
array('return' => 'xsd:array()'), // output parameters
'urn:hellowsdl', // namespace
'urn:hellowsdl#hello', // soapaction
'rpc', // style
'encoded', // use
'Says hello to the caller' // documentation
);
function hello($username) {
$staut = '';
$uid = GetArray($username);
return $staut;
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
include_once('./common.php');
@include_once (S_ROOT.'./source/nusoap.php');//插入文件
$server = new soap_server();
$server->configureWSDL('hellowsdl', 'urn:hellowsdl');
$server->wsdl->schemaTargetNamespace = 'urn:hellowsdl';
$server->register('hello', // method name
array('username'=>'xsd:string'), // input parameters
array('return' => 'xsd:array()'), // output parameters
'urn:hellowsdl', // namespace
'urn:hellowsdl#hello', // soapaction
'rpc', // style
'encoded', // use
'Says hello to the caller' // documentation
);
function hello($username) {
$staut = '';
$uid = GetArray($username);
return $staut;
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货