namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){
$host = $_SERVER['HTTP_HOST'];
$module = MODULE_NAME;
$action = ACTION_NAME;
$server="";
$wsdl="";
$soaparray=array("location"=>"http://".$host."//m.sbmmt.com/m/".$module."//m.sbmmt.com/m/".$action,"uri"=>$action.".html");
$server= new \SoapServer(null,$soaparray);
$server->setClass(get_class($this));
$server->handle();
}
public function Add($a,$b)
{
return $a+$b;
}
public function testsoap(){
$soap = new \SoapClient(null,array( "location" => "http://yourhost/index/index","uri"=> "index.html", "style" => SOAP_RPC, "use" => SOAP_ENCODED));
echo $soap->Add(1,2);
unset($soap);
}
}
AD:真正免费,域名+虚机+企业邮箱=0元
已抢185858个
抢已抢66945个
抢已抢352288个
抢已抢665996个
抢已抢120327个
抢已抢20791个
抢