Yii里获取当前controller和action的id
在控制器里
$name = $this->getId(); // controller
$name = $action->id; // action
在视图里
$name = $this->id = Yii::app()->controller->id; // controller
$name = $this->action->id = $this->getAction()->getId(); // action
Yii里获取当前controller和action的id
在控制器里
$name = $this->getId(); // controller
$name = $action->id; // action
在视图里
$name = $this->id = Yii::app()->controller->id; // controller
$name = $this->action->id = $this->getAction()->getId(); // action