I have a local test server and a live site that I would like to use
the same exact codebase on. To automatically switch the config
settings in core.php I do something like this:

if($_SERVER['HTTP_HOST'] == 'account.local') {
        // Local
        define('PATH_TO_WEBROOT',               'path/to/local/webroot/');
        define('ENABLE_EMAIL',                  false);
} else {
        // Live
        define('PATH_TO_WEBROOT',               
'/path/on/live/servers/webroot/');
        define('ENABLE_EMAIL',                  true);
}

However, how do I do a similar thing with the DB settings? I'd like to
do something like this, but I don't know where to call it:

if($_SERVER['HTTP_HOST'] == 'account.local')
        $useDbConfig = 'test';

Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to