.env file is optional
This commit is contained in:
parent
805b7f4bc1
commit
309c48d965
4
.env-dist
Normal file
4
.env-dist
Normal file
@ -0,0 +1,4 @@
|
||||
YII_DEBUG=1
|
||||
YII_ENV=dev
|
||||
YII_TRACE_LEVEL=0
|
||||
GITHUB_TOKEN=
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
require(__DIR__ . '/../../vendor/autoload.php');
|
||||
(new \Dotenv\Dotenv(__DIR__ . '/../..'))->load();
|
||||
|
||||
if (file_exists(__DIR__ . '/../..'))
|
||||
(new \Dotenv\Dotenv(__DIR__ . '/../..'))->load();
|
||||
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', getenv('YII_DEBUG') ? (getenv('YII_DEBUG') == 'false' ? false : getenv('YII_DEBUG')) : true);
|
||||
defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV') ? getenv('YII_ENV') : 'dev');
|
Loading…
x
Reference in New Issue
Block a user