您好,欢迎访问四川鑫光豪耀机电有限公司!

咨询热线:

18980820575
✕

营山发电机维修,营山柴油发电机维修,品牌发电机维修,发电机维修服务公司

phptrycatch异常处理结构

try{
   // if(!empty($UserCode)){
   $url= '';
   $client=new\SoapClient($url);
   $userLogin=new\stdClass();

   $userLogin->UserCode=$UserCode;
   $userLogin->ExpirDate=2;

   $loginResponse=$client->__call("GetToken",array(
       $userLogin
   ));
   $token=$loginResponse->GetTokenResult;
}catch(\Exception$e) {  //千万要注意这里的 \  很重要!!!否则不执行这里来
   $token='';
}
友情链接 :