Home > php教程 > php手册 > soap远程服务

soap远程服务

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 19:38:18
Original
1116 people have browsed it

无详细内容 无 ?phptry{$soapcfg=array("location"="http://localhost/OOP/SOAP/backSoap1.php","uri"="phpjs");$soap=new SoapClient(NULL,$soapcfg);echo $soap-toAlert('Notice!');echo $soap-toOpen('http://www.baidu.com','_blank');}catch(Exception $

<?php
try{
	$soapcfg=array(
	"location"=>"http://localhost/OOP/SOAP/backSoap1.php",
	"uri"=>"phpjs"
	);
	
	$soap=new SoapClient(NULL,$soapcfg);
	
	echo $soap->toAlert('Notice!');
	echo $soap->toOpen('http://www.baidu.com','_blank');
	
}catch(Exception $e){
	echo $e->getMessage();
}
?>
Copy after login
<?php
class PHPjs{
	
	function toAlert($str){
		return "<script language='javascript'>
		       alert('$str');
			   </script>";
	}
	
	function toOpen($url,$style){
	return "<script language='javascript'>
	        window.open('$url','$style');
			</script>";
	}
}

$soap=new SoapServer(NULL,array('uri'=>'phpjs'));
$soap->setClass('PHPjs');
$soap->handle();
?>
Copy after login
Related labels:
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
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template