Different configuration file based on IP

I would like to use different configuration file based on IP(IP to region)

I am having problem setting custom configuration files, and not with the IP lookup/database.

How can I implement such a feature in Yii?

Put something like the following into your index.php:




    define('YII_DEBUG', true);




else { 

    define('YII_DEBUG', false);





$app = Yii::createWebApplication($configFile)->run();

Of course you’ll need to replace conditions to ips checking.