CI envrionment handling

This commit is contained in:
Olusesan Ameye
2025-08-27 04:44:52 +00:00
parent 1f950d6793
commit 2d6a37297e
9 changed files with 30 additions and 12 deletions
+2
View File
@@ -23,3 +23,5 @@ ini_set('display_errors', '0');
| release of the framework.
*/
defined('CI_DEBUG') || define('CI_DEBUG', false);
$_ENV['CONFIG_NAME']='<h1>I beleive you are doing CI envrionment handling wrong. You should define CI_ENVIRONMENT environment variable and utilize the respective app/Config/Boot/...php file</h1><br/>';
+2 -2
View File
@@ -11,8 +11,8 @@ class Home extends BaseController
public function what_env(): string
{
$curr_env = $_ENV['CONFIG_NAME'];
echo $curr_env;
$curr_env = env('CONFIG_NAME','undefined?');
echo env('CI_ENVIRONMENT');
return $curr_env;
}
public function provision(): string