Estoy usando Yii.
si mi URL es http://localhost/evengee/event/page/id/2/sfn+master/?tab=3
Mi verdadera URL (ruta de archivo) sólo es http://localhost/evengee
¿Cómo iba a obtener, de preferencia en la vista:¿Cómo obtengo la url actual sin params en Yii?
- URL completa
http://localhost/evengee/event/page/id/2/sfn+master/?tab=3
- URL sin parámetros explícitos
http://localhost/evengee/event/page/id/2/sfn+master/
Sé que puedo dividir/explotar str_replace por? y use $ _SERVER. Preferiría usar métodos nativos Yii.
intento 'Yii :: app() -> request-> getUrl()', pero esto no devolvió el nombre de dominio. – GusDeCooL
Utilice createAbsoluteUrl si desea el nombre de dominio completo. '$ this-> createAbsoluteUrl (Yii :: app() -> request-> getUrl());' O 'Yii :: app() -> createAbsoluteUrl (Yii :: app() -> request-> getUrl()); ' –