2015-08-28 23:43:35 -05:00
|
|
|
<?php
|
2016-02-02 10:53:32 -06:00
|
|
|
|
2015-08-28 23:43:35 -05:00
|
|
|
// Path to the front controller (this file)
|
2018-10-29 23:25:57 -05:00
|
|
|
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
|
2015-08-28 23:43:35 -05:00
|
|
|
|
2016-06-23 00:29:44 -05:00
|
|
|
/*
|
|
|
|
*---------------------------------------------------------------
|
2017-01-15 23:06:39 -06:00
|
|
|
* BOOTSTRAP THE APPLICATION
|
2016-06-23 00:29:44 -05:00
|
|
|
*---------------------------------------------------------------
|
2017-01-15 23:06:39 -06:00
|
|
|
* This process sets up the path constants, loads and registers
|
|
|
|
* our autoloader, along with Composer's, loads our constants
|
|
|
|
* and fires up an environment-specific bootstrapping.
|
2016-03-30 07:30:02 +09:00
|
|
|
*/
|
|
|
|
|
2017-01-15 23:06:39 -06:00
|
|
|
// Ensure the current directory is pointing to the front controller's directory
|
2022-05-07 13:04:29 +09:00
|
|
|
chdir(FCPATH);
|
2016-03-30 16:19:46 +09:00
|
|
|
|
2020-10-11 16:03:14 +07:00
|
|
|
// This is the line that might need to be changed, depending on your folder structure.
|
2021-05-26 17:08:40 +07:00
|
|
|
$pathsConfig = FCPATH . '../app/Config/Paths.php';
|
2022-05-07 13:04:29 +09:00
|
|
|
// ^^^ Change this line if you move your application folder
|
2022-05-07 11:56:11 +09:00
|
|
|
|
2022-05-07 13:04:29 +09:00
|
|
|
// Load our paths config file
|
2022-05-07 12:51:32 +09:00
|
|
|
require $pathsConfig;
|
2020-10-11 16:03:14 +07:00
|
|
|
|
2017-01-15 23:35:14 -06:00
|
|
|
$paths = new Config\Paths();
|
|
|
|
|
2018-05-29 13:52:38 -07:00
|
|
|
// Location of the framework bootstrap file.
|
2020-08-26 01:22:28 +08:00
|
|
|
$bootstrap = rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
|
2022-05-07 11:56:11 +09:00
|
|
|
|
2022-05-07 12:51:32 +09:00
|
|
|
require $bootstrap;
|
2022-05-07 11:56:11 +09:00
|
|
|
|
|
|
|
/*
|
|
|
|
* ---------------------------------------------------------------
|
|
|
|
* GRAB OUR CODEIGNITER INSTANCE
|
|
|
|
* ---------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* The CodeIgniter class contains the core functionality to make
|
|
|
|
* the application run, and does all of the dirty work to get
|
|
|
|
* the pieces all working together.
|
|
|
|
*/
|
2022-05-07 13:04:29 +09:00
|
|
|
$app = Config\Services::codeigniter();
|
2022-05-07 11:56:11 +09:00
|
|
|
$app->initialize();
|
2022-02-03 17:02:19 +09:00
|
|
|
$context = is_cli() ? 'php-cli' : 'web';
|
|
|
|
$app->setContext($context);
|
2016-03-30 16:19:46 +09:00
|
|
|
|
2015-08-28 23:43:35 -05:00
|
|
|
/*
|
2017-01-15 23:06:39 -06:00
|
|
|
*---------------------------------------------------------------
|
|
|
|
* LAUNCH THE APPLICATION
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* Now that everything is setup, it's time to actually fire
|
2018-10-05 00:21:05 -04:00
|
|
|
* up the engines and make this app do its thang.
|
2015-08-28 23:43:35 -05:00
|
|
|
*/
|
2017-01-15 23:06:39 -06:00
|
|
|
$app->run();
|