请告诉我为什么我必须放在"\"
前面\SoapClient
。当我删除"\"
时,我有一个错误。
public function indexAction($name)
{
try {
$client = new \SoapClient('some WSDL', array('trace' => 1));
$a = array('Login'=>'1', 'Password'=>'1', 'LetterNo'=>'1');
$response = $client->__soapCall('GetTracking', array($a));
ladybug_dump($response->GetTrackingResult->Status);
} catch (\SoapFault $e) {
var_dump($e->getMessage(), $client->__getLastResponse()); die();
}
return array('response' => $response);
}
感谢帮助