summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-06-03 17:36:36 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-06-03 17:36:36 +0200
commitdda21f6abc76451997b12c07e6066aa49c2d423d (patch)
tree23aef7e86df862798e92a6a0afdf5cc9719cd638 /index.php
parent2d8707f8ba27f16a226d85a011aeab5325b27100 (diff)
Added support for $_SERVER['CI_ENV'] in index.php
Remember this is entirely optional, nothing will change if you do not which to use Multiple Environments just like right now. If you DO set CI_ENV you can manipulate the switch that controls error reporting, etc, so set it to "production" on your live site to hide errors from users. If you don't require this logic you can remove it, or change it entirely to check HTTP_HOST for environment subdomains, or check IP address, etc.
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 5a1190112..3b00dd360 100644
--- a/index.php
+++ b/index.php
@@ -42,7 +42,7 @@
*
* NOTE: If you change these, also change the error_reporting() code below
*/
- define('ENVIRONMENT', 'development');
+ define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
/*
*---------------------------------------------------------------
* ERROR REPORTING