Get current URL/URI without some of $_GET variables

后端 未结 15 2088
被撕碎了的回忆
被撕碎了的回忆 2021-01-30 09:10

How, in Yii, to get the current page\'s URL. For example:

http://www.yoursite.com/your_yii_application/?lg=pl&id=15

but excluding the

15条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-30 09:23

    For Yii2: This should be safer Yii::$app->request->absoluteUrl rather than Yii::$app->request->url

提交回复
热议问题