duangan1945 2015-05-24 01:56
浏览 312
已采纳

如何在Yii中获取当前操作ID?

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?

  • 写回答

2条回答 默认 最新

  • duanfei7508 2015-05-24 01:59
    关注

    Current action id can be taken like this,

      $id = Yii::app()->request->getParam('id');// param name
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?