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 = ‘‘;
}
本文出自 “PHP/Linux@HeFei” 博客,请务必保留此出处http://liang3391.blog.51cto.com/178205/1941166
原文地址:http://liang3391.blog.51cto.com/178205/1941166