scriptkiddie
scriptkiddie

Reputation: 605

Yii : Is it possible to know which configuration file Yii::app() is using

I am having problem with Yii::app()

in protected/config/main.php

'params' => require(dirname(__FILE__).'/../../mainsite_config.php'),

in mainsite_config.php

<?php return array("siteurl"=> "http://domainname.com" ,"recaptch_key"=>"public key" ,'recaptcha_private_key'=>'private key')

but code Yii::app()->params['recaptcha_key'] returns empty value.

So I want to know which configuration file Yii:app() is currently using. Please help me

Upvotes: 1

Views: 37

Answers (1)

Developerium
Developerium

Reputation: 7265

I think you can solve this with pure php :D

make another property in the returning array like

 [
   'dir' => __FILE__,
   ...

and will get your file name in params

Upvotes: 1

Related Questions