下面的 PHP 函数产生了这个错误: Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '$', on this line:throw new ( '' . 'Illigal name for service name "' . $name . '" is given' );
有谁知道出了什么问题?
function registerService($name, $provider) {
if (strlen( $name ) < 1) {
Exception;
throw new ( '' . 'Illigal name for service name "' . $name . '" is given' );
}
$this->_Services[$name] = $provider;
}
谢谢