无详细内容 无 ?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(); } ?>
<?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(); ?>