新手---需要个wedserver实例
解决方案 »
- apache httpd.conf 设置可以使用环境变量嘛
- mysql_fetch_assoc() expects parameter 1 to be resource,怎么解决?
- php回调函数
- 附件上传下载怎么写啊
- php select 菜鸟问题.急...在线等
- 在win_xp+apache的环境下使用mail函数怎么发不出去邮件?
- 100分求PHP代码!判断几个网站是否访问正常,谢谢了!
- linux主机能用PHP访问ACCESS数据库吗?
- 在WIN2000下的PHP+MYSQL可以直接移植到LINUX下吗?(送100分,先来先得)
- linux环境下PHP加载pcntl 模块失败
- 高手请指导 表单复选框的 菜鸟不甚感激
- smarty的问题
<form action="index.php" method="post">
user:<input name="user" type="text" />
pwd:<input name="pwd" type="password" />
<input type="submit" value="check" />
</form>
index.php
<?php
$user=$_POST['user'];
$pwd=$_POST['pwd'];
include '../lib/nusoap.php';
//$client = new nusoap_client('http://localhost/webs1/demo2/2/server.php?wsdl',true);
$client = new nusoap_client('http://localhost/webs1/demo2/2/server.php?wsdl',true);
$return = $client->call('checkLogin',array('user'=>$user,'pwd'=>$pwd,"check"=>'false'));
echo $return;
?>
server.php
<?php
include ('../lib/nusoap.php');
/*
$server = new soap_server();
$server->configureWSDL('myBccd');
$server->register('getBccd',array('user'=>'xsd:string','pwd'=>'xsd:string'),array('return'=>'xsd:string'));
function getBccd($user,$pwd){
return '用户名: '.$user. ', 密码:'.$pwd.'';
}
$server->service($HTTP_RAW_POST_DATA);
*/
//add by leilang function checkLogin($user,$pwd,$check)
{
define(USER,'admin');
define(PWD,'123456'); if(USER==$user&&PWD==$pwd)
{
return 'user:'.$user.',pwd:'.$pwd.'check '.$check.'!';
}
else
{
return 'user:'.$user.',pwd:'.$pwd.'check fail!';
}
}
$login = new soap_server();
$login->configureWSDL('checkLogin');
$login->register('checkLogin',array('user'=>'xsd:string','pwd'=>'xsd:string','check'=>'xsd:string'),array('return'=>'xsd:string'));
$login->service($HTTP_RAW_POST_DATA);
?>