<?php
if(file_exists('handleReport.wsdl')){
    ini_set("soap.wsdl_cache_enabled", "0");
    try {
        include("handleReport.php");
        $objSoapServer = new SoapServer("handleReport.wsdl");//ThirdOrder.wsdl是刚创建的wsdl文件
        //$objSoapServer = new SoapServer("server.php?wsdl");//这样也行
        $objSoapServer->setClass("handleReport");//注册ThirdOrder类的所有方法
        $objSoapServer->handle();//处理请求
    }catch (\think\Exception $e)
    {
        var_dump($e);die;
    }

}else{
    include("handleReport.php");
    include("SoapDiscovery.class.php");
    $disc = new SoapDiscovery('handleReport', 'handleReport');//api类文件名，service接口目录
    $res = $disc->getWSDL();
}