I want to define new config value ‘server-status’=> ‘Production’ or ‘server-status’=> ‘Development’ in config/main.php
and later access them in sitecontroller to switch to diffeetn authentication server automatically depending upon the server-status.
how i can acheive that?
You can use Yii::app()->params to store such variables.
'params' => array(
'server-status' => 'production',
However, maybe it’s a better solution to define a global constant in your index.php. It has some benefits like using the constant in your config file (eg use a different db connnection in production).
Thanks for reply. it is working now.
I used params instead of constant.