cfmgrv3 init...
This commit is contained in:
parent
4c47150a55
commit
987d8e592e
@ -16,7 +16,9 @@ if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
|
|||||||
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
|
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
// Ensure the current directory is pointing to the front controller's directory
|
// Ensure the current directory is pointing to the front controller's directory
|
||||||
chdir(FCPATH);
|
if (getcwd() . DIRECTORY_SEPARATOR !== FCPATH) {
|
||||||
|
chdir(FCPATH);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*---------------------------------------------------------------
|
*---------------------------------------------------------------
|
||||||
@ -41,13 +43,23 @@ require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstra
|
|||||||
require_once SYSTEMPATH . 'Config/DotEnv.php';
|
require_once SYSTEMPATH . 'Config/DotEnv.php';
|
||||||
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();
|
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();
|
||||||
|
|
||||||
|
// Define ENVIRONMENT
|
||||||
|
if (! defined('ENVIRONMENT')) {
|
||||||
|
define('ENVIRONMENT', env('CI_ENVIRONMENT', 'production'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load Config Cache
|
||||||
|
// $factoriesCache = new \CodeIgniter\Cache\FactoriesCache();
|
||||||
|
// $factoriesCache->load('config');
|
||||||
|
// ^^^ Uncomment these lines if you want to use Config Caching.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
* GRAB OUR CODEIGNITER INSTANCE
|
* GRAB OUR CODEIGNITER INSTANCE
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* The CodeIgniter class contains the core functionality to make
|
* The CodeIgniter class contains the core functionality to make
|
||||||
* the application run, and does all of the dirty work to get
|
* the application run, and does all the dirty work to get
|
||||||
* the pieces all working together.
|
* the pieces all working together.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -60,8 +72,16 @@ $app->setContext($context);
|
|||||||
*---------------------------------------------------------------
|
*---------------------------------------------------------------
|
||||||
* LAUNCH THE APPLICATION
|
* LAUNCH THE APPLICATION
|
||||||
*---------------------------------------------------------------
|
*---------------------------------------------------------------
|
||||||
* Now that everything is setup, it's time to actually fire
|
* Now that everything is set up, it's time to actually fire
|
||||||
* up the engines and make this app do its thang.
|
* up the engines and make this app do its thang.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$app->run();
|
$app->run();
|
||||||
|
|
||||||
|
// Save Config Cache
|
||||||
|
// $factoriesCache->save('config');
|
||||||
|
// ^^^ Uncomment this line if you want to use Config Caching.
|
||||||
|
|
||||||
|
// Exits the application, setting the exit code for CLI-based applications
|
||||||
|
// that might be watching.
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|||||||
5
spark
5
spark
@ -78,6 +78,11 @@ require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstra
|
|||||||
require_once SYSTEMPATH . 'Config/DotEnv.php';
|
require_once SYSTEMPATH . 'Config/DotEnv.php';
|
||||||
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();
|
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();
|
||||||
|
|
||||||
|
// Define ENVIRONMENT
|
||||||
|
if (! defined('ENVIRONMENT')) {
|
||||||
|
define('ENVIRONMENT', env('CI_ENVIRONMENT', 'production'));
|
||||||
|
}
|
||||||
|
|
||||||
// Grab our CodeIgniter
|
// Grab our CodeIgniter
|
||||||
$app = Config\Services::codeigniter();
|
$app = Config\Services::codeigniter();
|
||||||
$app->initialize();
|
$app->initialize();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user