php webservice报错Object id #2啦!
webclient.php文件:
<?php
$arrOptions = array( 'uri'=>'http://10.10.19.111/','location'=>'http://10.10.19.111/webservice/webservice.php','trace'=>true,'exceptions'=>0 );
$objSoapClient = new SoapClient( null,$arrOptions );
try
{
$strReturn = $objSoapClient->returnString();
}
catch( Exception $e )
{
echo $e->getMessage();
}
echo "strReturn=";
echo $strReturn;
?>
webservice.php文件:
<?php
require_once( "Basic.php" );
$arrOptions = array( 'uri'=>'http://10.10.19.111/' );
$objSoapServer = new SoapServer( null,$arrOptions );
$objSoapServer->setClass("Basic");
$objSoapServer->handle();
?>
Basic.php文件:
<?php
class Basic
{
public function returnString()
{
return "Hello World !!!";
}
}
?>
浏览器浏览webclient.php文件结果:
strReturn=Object id #2
这个例子是照着网上的例子做的,别人实践成功了,在我的上面就是不行
这个就是运行结果:strReturn=Object id #2
应该得到的结果是:strReturn=Hello World !!!
相关问答:
现有一个 avi 格式的视频,
想在一个页面中加一个上传视频的功能,把这个avi的文件上传上去,并可在网页中点击查视频,这怎么实现呀,
自己去找一个普通的上传代码就可以了。
至于查看视频,你指的是在线 ......
系统:win2003 + IIS 6.0
php 是最新的版本了 刚下载的
安装的时候选择 IIS FastCGI模式
安装成功了
运行phpinfo 成功显示
在IIS新建网站 导入原来运行于apach的帝国管理系统网站 ......
$a = $_FILES['userfile']['name'] ;
$test = $a;
$p = split('/',$test);
$p[count($p)-1];
$content = file_get_contents("$p");
$con ......
<?php
/*
功能:PHP伪静态化页面的实现
具体用法:
例如链接为:test.php/year/2006/action/_add.html
mod_rewrite();
$yearn= $_GET["year"];//结果为'2006'
......