CI envrionment handling
This commit is contained in:
@@ -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/>';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user