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
Something like this should work, if run in the controller:
$controller = $this;
$path = '/path/to/app/'
. $controller->module->getId() // only necessary if you're using modules
. '/' . $controller->getId()
. '/' . $controller->getAction()->getId()
. '/';
This assumes that you are using 'friendly' URLs in your app config.