最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Yii框架如何获取当前controlle和action的id
时间:2022-06-25 00:54:37 编辑:袖梨 来源:一聚教程网
在控制器里
$name = $this->getId(); // controller
$name = $action->id; // action
在视图里
$name = Yii::app()->controller->id; // controller
$name = $this->getAction()->getId(); // action