I need a function to get the current action Id, for example if the url is /controller/view/5 I want to get the 5 which is the action Id, how I can do that in Yii?
如何在Yii中获取当前操作ID?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
duanfei7508 2015-05-24 01:59关注Current action id can be taken like this,
$id = Yii::app()->request->getParam('id');// param name本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报