一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Yii框架如何获取当前controlle和action的id

时间:2014-11-16 编辑:简简单单 来源:一聚教程网

在控制器里

$name = $this->getId();  // controller

$name = $action->id;  // action

在视图里

$name = Yii::app()->controller->id;  // controller

$name = $this->getAction()->getId(); // action

热门栏目