How to load configuration set in config/main.php?

If I added some key-value pairs in the returned array in config/main.php, how can I load value with a given key?

Set the configuration in ‘param’ (like adminEmail in the default skeleton)

so in configMain:


		// this is used in contact page




In your code, wherever you need:


Thank you! I read through the definitive guide and could not find the answer. So usually how to find the answer for this kind of questions?

Posting in the forum… :lol:

I am jocking. Just keep in mind that all is defined in main.conf (and all that belongs to CWebApplication) can be accessed in any part of code with Yii::app()