Welcome Guest, Not a member yet? Register   Sign In
How to change the ENVIRONMENT type
#8

Code:
if(! defined('ENVIRONMENT') )
{
    $domain = strtolower($_SERVER['HTTP_HOST']);
    switch($domain)
    {
        case 'www.yoursite.com' :
            define('ENVIRONMENT', 'production');
        break;
        case 'test.yoursite.com' :
            define('ENVIRONMENT', 'testing');
        break;
        default :
            define('ENVIRONMENT', 'development');
        break;
    }
}

I'm using the above code for my application. Hope it helps Idea
Reply


Messages In This Thread
How to change the ENVIRONMENT type - by lionking - 03-31-2015, 06:37 AM
RE: How to change the ENVIRONMENT type - by Narf - 03-31-2015, 06:41 AM
RE: How to change the ENVIRONMENT type - by Narf - 03-31-2015, 08:33 AM
RE: How to change the ENVIRONMENT type - by alenn - 04-05-2015, 11:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB