谁知道php 写webservice服务器端? 执着收几个参数:如pid title cotent参数插入数据库 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 搜索一下:PHP Web Services 入门概要 可以看一下 soapserver 这个类:http://cn2.php.net/manual/en/class.soapserver.php <?php//soapserverfunction insertSql($pid,$title,$content){ //sql insert if(true) { return true; } else { return false; }}$server = new SoapServer(null, array('uri' => "http://test-uri/"));$server->addFunction('insertSql');$server->handle();?><?php //soapserver$client = new SoapClient(null, array('location' => "http://127.0.0.1/test/csdn/soapserver.php",'uri' => "http://test-uri/"));$parm=array('pid'=>$pid,'title'=>$title,'content'=>$content);$client->__soapCall('insertSql',$parm);?> 先写一个function 做这个写完后加一点点东西就是webservice了 在线等待 高手帮忙下面JS代码换成PHP,谢谢 这样能做到吗??? 郁闷的php字符判断为空问题! smarty 怎么在模板上循环遍历输出三维数据??? 函数与配置文件php.ini? 关于PHP中的链接。请熟悉PHP的朋友进来帮个忙。 用substr取出来的汉字试乱码 怎么设定程序执行时间 在php中的变量值如何传到javascript中的变量去。代码如何写? PHP替换字符串问题 php 写入 mssql 2005 中文都是乱码 ,但是写入到mysql就正常,高手给个解决办法呀?
<?php
//soapserver
function insertSql($pid,$title,$content)
{
//sql insert
if(true)
{
return true;
}
else
{
return false;
}
}
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
$server->addFunction('insertSql');
$server->handle();
?>
<?php
//soapserver
$client = new SoapClient(null, array('location' => "http://127.0.0.1/test/csdn/soapserver.php",
'uri' => "http://test-uri/"));
$parm=array('pid'=>$pid,'title'=>$title,'content'=>$content);
$client->__soapCall('insertSql',$parm);
?>
写完后加一点点东西就是webservice了