Articles Posted in the " Yii URL " Category

  • Yii CApplication ->Yii::app()

    Yii CApplication ->Yii::app()

    CApplication is the base class for all application classes. It contains global variables, functions etc. Here i added some most reused functions and properties of yii capplication. Simply we will call this “Yii::app()” Properties/ […]



  • Loginurl In Yii

    Loginurl In Yii

    Here i added the code to “how to set default login url in yii” config/main.php ............... 'components'=>array( 'user'=>array( 'class' => 'WebUser', 'loginUrl' => array('user/login'), ), ), ...............


  • Home page url in yii

    Home page url in yii

    Here i added the code to “how to set and get the home page url in yii” Set Home Page Url Get Home Page Url Set Home Page Url ............... 'homeUrl'=>array('user/index'), 'components'=>array( ............... ), […]


  • Yii current Url

    Yii current Url

    To Get Current Url Get Action Name Get Controller Name To Get Current Url echo Yii::app()->request->requestUri; Get Action Name //Anywhere Yii::app()->controller->action->id //Inside Controller public function beforeAction($action) { $actionId = $action->id; .......... } Get Controller […]