07-20-2023, 07:54 AM
How, in Yii, to get the current page's URL. For example:
but excluding the `$GET_['lg']` (without parsing the string manually)?
I mean, I'm looking for something similar to the `Yii::app()->requestUrl` / `Chtml::link()` methods, for returning URLs minus some of the `$_GET` variables.
**Edit**: Current solution:
unset $_GET['lg'];
echo Yii::app()->createUrl(
Yii::app()->controller->getId().'/'.Yii::app()->controller->getAction()->getId() ,
$_GET
);
[To see links please register here]
but excluding the `$GET_['lg']` (without parsing the string manually)?
I mean, I'm looking for something similar to the `Yii::app()->requestUrl` / `Chtml::link()` methods, for returning URLs minus some of the `$_GET` variables.
**Edit**: Current solution:
unset $_GET['lg'];
echo Yii::app()->createUrl(
Yii::app()->controller->getId().'/'.Yii::app()->controller->getAction()->getId() ,
$_GET
);