Created
August 26, 2010 10:11
-
-
Save jolantis/551177 to your computer and use it in GitHub Desktop.
ee2 database.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Setup the environment | |
if (!defined('EE_ENV')) { | |
define('EE_SERVER_NAME', $_SERVER['SERVER_NAME']); | |
if ( strstr( EE_SERVER_NAME, '.local' ) ) define('EE_ENV', 'local'); | |
elseif ( strstr( EE_SERVER_NAME, '.dev' ) ) define('EE_ENV', 'dev'); | |
elseif ( strstr( EE_SERVER_NAME, '.stage' ) ) define('EE_ENV', 'stage'); | |
else define('EE_ENV', 'production'); | |
} | |
// Set the environmental config | |
if (EE_ENV == 'local') { | |
$db['expressionengine']['hostname'] = ""; | |
$db['expressionengine']['username'] = ""; | |
$db['expressionengine']['password'] = ""; | |
$db['expressionengine']['database'] = "local-domain-com"; | |
} | |
elseif (EE_ENV == 'dev') { | |
$db['expressionengine']['hostname'] = ""; | |
$db['expressionengine']['username'] = ""; | |
$db['expressionengine']['password'] = ""; | |
$db['expressionengine']['database'] = "dev-domain-com"; | |
} elseif (EE_ENV == 'stage') { | |
$db['expressionengine']['hostname'] = ""; | |
$db['expressionengine']['username'] = ""; | |
$db['expressionengine']['password'] = ""; | |
$db['expressionengine']['database'] = "stage-domain-com"; | |
} else { | |
$db['expressionengine']['hostname'] = ""; | |
$db['expressionengine']['username'] = ""; | |
$db['expressionengine']['password'] = ""; | |
$db['expressionengine']['database'] = "domain-com"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment