From 6841711127d9ff44a013646d6aee1cfd4d97c065 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Wed, 24 Jan 2024 14:51:19 +0100 Subject: [PATCH] Changed the way environment is set --- index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 7d8fe56dd..fc458e605 100644 --- a/index.php +++ b/index.php @@ -54,7 +54,11 @@ * NOTE: If you change these, also change the error_reporting() code below */ #define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); - define('ENVIRONMENT', 'development'); + if (file_exists('.debug')) { + define('ENVIRONMENT', 'development'); + } else { + define('ENVIRONMENT', 'production'); + } /* *---------------------------------------------------------------