nusoap报错,查了很久也没解决,高手来看一看吧,谢谢

WBOY
Release: 2016-06-23 13:48:00
Original
868 people have browsed it

第一次用nusoap,出错,查了很久了还是没解决问题,请教高手。

003.php如下:

<?php	require_once('lib/nusoap.php');		function hello(){		return 'Hello World';	}		$server = new soap_server();	$server->register('hello');	$server->service($HTTP_RAW_POST_DATA);
Copy after login

004.php如下:
<?php	require_once('lib/nusoap.php');		$wsdl = 'http://www.127.0.0.1/eroom/003.php';	$client = new nusoap_client($wsdl);	$res = $client->call('hello');	echo $res;	if($client->getError()){		echo $client->getError();	}
Copy after login

浏览器访问:http://localhost/eroom/004.php ,出现如下信息:

HTTP Error: Couldn't open socket connection to server http://www.127.0.0.1/eroom/003.php prior to connect(). This is often a problem looking up the host name.



请问:是什么原因造成的?怎样解决?十分感谢



回复讨论(解决方案)

你确定网址准确?

http://www.127.0.0.1/eroom/003.php
??地址有??。
??是127.0.0.1吧

你确定网址准确?



http://www.127.0.0.1/eroom/003.php
??地址有??。
??是127.0.0.1吧


我的错!!!
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!