Skip to content

Commit

Permalink
Release v3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 7, 2022
1 parent f7f198f commit a34b190
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#--------------------------------------------------------------------
# Example Environment Configuration file
#
# This file can be used as a starting point for your own
# custom .env files, and contains most of the possible settings
# available in a default install.
#
# By default, all of the settings are commented out. If you want
# to override the setting, you must un-comment it by removing the '#'
# at the beginning of the line.
#--------------------------------------------------------------------

#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

CI_ENVIRONMENT=production

ENVIRONMENT=production
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------

# If you have trouble with NodCMS dynamic base url finder. Uncomment the bellow line and place your domain in there.
# app.baseURL='https://your-domain'
# If you have trouble with `.`, you could also use `_`.
# app_baseURL = ''
# app.forceGlobalSecureRequests=false

# app.CSPEnabled=false
28 changes: 23 additions & 5 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
}
unset($minPHPVersion);

// Acceptable values: development, testing, production
define('ENVIRONMENT', 'production');

// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);

Expand All @@ -39,7 +36,7 @@
define("URL_PROTOCOL", $protocol_status ? "https://" : "http://");

// Find the base url
define("CONFIG_BASE_URL", URL_PROTOCOL.$_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/");
define("CONFIG_BASE_URL", URL_PROTOCOL.$_SERVER['HTTP_HOST'] . rtrim(dirname(str_replace('index.php/', '', $_SERVER['PHP_SELF'])), '/\\') . "/");

define("DB_CONFIG_PATH", COREPATH.'Config/Database.php');

Expand Down Expand Up @@ -68,7 +65,27 @@
$paths = new Config\Paths();

// Location of the framework bootstrap file.
$app = require rtrim($paths->systemDirectory, '/ ') . '/bootstrap.php';
require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';


// Load environment settings from .env files into $_SERVER and $_ENV
require_once SYSTEMPATH . 'Config/DotEnv.php';
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();

/*
* ---------------------------------------------------------------
* 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.
*/

$app = Config\Services::codeigniter();
$app->initialize();
$context = is_cli() ? 'php-cli' : 'web';
$app->setContext($context);

/*
*---------------------------------------------------------------
Expand All @@ -77,4 +94,5 @@
* Now that everything is setup, it's time to actually fire
* up the engines and make this app do its thang.
*/

$app->run();

0 comments on commit a34b190

Please sign in to comment.