Created
October 28, 2011 13:40
-
-
Save nathanpitman/1322288 to your computer and use it in GitHub Desktop.
If you're using ExpressionEngine 2 and you want to have a global variable which you can use to conditionally include content in a dev environment just paste this switch statement into your index.php file at around about line 95.
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
switch ($_SERVER['HTTP_HOST']) { | |
//development | |
case 'dev.example.com': | |
$assign_to_config['global_vars']['site_mode'] = 'dev'; | |
break; | |
//default | |
default: | |
$assign_to_config['global_vars']['site_mode'] = 'live'; | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment