Merge branch 'main' of bitbucket.org:venbainformationtechnology/the_mechanic into main
This commit is contained in:
commit
53f7ef2391
49
.htaccess
Normal file
49
.htaccess
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# Disable directory browsing
|
||||||
|
Options -Indexes
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Rewrite engine
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Turning on the rewrite engine is necessary for the following rules and features.
|
||||||
|
# FollowSymLinks must be enabled for this to work.
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
Options +FollowSymlinks
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# If you installed CodeIgniter in a subfolder, you will need to
|
||||||
|
# change the following line to match the subfolder you need.
|
||||||
|
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
|
||||||
|
# RewriteBase /
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
|
# Rewrite "www.example.com -> example.com"
|
||||||
|
RewriteCond %{HTTPS} !=on
|
||||||
|
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
||||||
|
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
|
||||||
|
|
||||||
|
# Checks to see if the user is attempting to access a valid file,
|
||||||
|
# such as an image or css document, if this isn't true it sends the
|
||||||
|
# request to the front controller, index.php
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]
|
||||||
|
|
||||||
|
# Ensure Authorization header is passed along
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule !mod_rewrite.c>
|
||||||
|
# If we don't have mod_rewrite installed, all 404's
|
||||||
|
# can be sent to index.php, and everything works as normal.
|
||||||
|
ErrorDocument 404 index.php
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Disable server signature start
|
||||||
|
ServerSignature Off
|
||||||
|
# Disable server signature end
|
||||||
@ -16,7 +16,7 @@ class App extends BaseConfig
|
|||||||
*
|
*
|
||||||
* E.g., http://example.com/
|
* E.g., http://example.com/
|
||||||
*/
|
*/
|
||||||
public string $baseURL = 'http://localhost/the_mechanic/public';
|
public string $baseURL = 'http://localhost/the_mechanic/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
|
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
|
||||||
@ -57,7 +57,8 @@ class App extends BaseConfig
|
|||||||
*
|
*
|
||||||
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
|
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
|
||||||
*/
|
*/
|
||||||
public string $uriProtocol = 'REQUEST_URI';
|
// public string $uriProtocol = 'REQUEST_URI';
|
||||||
|
public string $uriProtocol = 'PATH_INFO';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
|
|||||||
@ -38,33 +38,33 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Vendor js -->
|
<!-- Vendor js -->
|
||||||
<script src="<?php echo base_url(); ?>/assets/js/vendor.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/js/vendor.min.js"></script>
|
||||||
|
|
||||||
<!-- App js -->
|
<!-- App js -->
|
||||||
<script src="<?php echo base_url(); ?>/assets/js/app.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/js/app.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- third party js -->
|
<!-- third party js -->
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/pdfmake/build/pdfmake.min.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/pdfmake/build/pdfmake.min.js"></script>
|
||||||
<script src="<?php echo base_url(); ?>/assets/libs/pdfmake/build/vfs_fonts.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/libs/pdfmake/build/vfs_fonts.js"></script>
|
||||||
<!-- third party js ends -->
|
<!-- third party js ends -->
|
||||||
|
|
||||||
<!-- Datatables init -->
|
<!-- Datatables init -->
|
||||||
<script src="<?php echo base_url(); ?>/assets/js/pages/datatables.init.js"></script>
|
<script src="<?php echo base_url(); ?>public/assets/js/pages/datatables.init.js"></script>
|
||||||
|
|
||||||
<!-- Toster -->
|
<!-- Toster -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js"></script>
|
||||||
|
|||||||
@ -8,24 +8,24 @@
|
|||||||
<meta content="Coderthemes" name="author" />
|
<meta content="Coderthemes" name="author" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<!-- App favicon -->
|
<!-- App favicon -->
|
||||||
<link rel="shortcut icon" href="<?php echo base_url()?>/assets/images/favicon.ico">
|
<link rel="shortcut icon" href="<?php echo base_url()?>public/assets/images/favicon.ico">
|
||||||
|
|
||||||
<!-- third party css -->
|
<!-- third party css -->
|
||||||
<link href="<?php echo base_url()?>/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="<?php echo base_url()?>/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="<?php echo base_url()?>/assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="<?php echo base_url()?>/assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||||
<!-- third party css end -->
|
<!-- third party css end -->
|
||||||
|
|
||||||
<!-- App css -->
|
<!-- App css -->
|
||||||
<link href="<?php echo base_url()?>/assets/css/bootstrap-modern.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
|
<link href="<?php echo base_url()?>public/assets/css/bootstrap-modern.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
|
||||||
<link href="<?php echo base_url()?>/assets/css/app-modern.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
|
<link href="<?php echo base_url()?>public/assets/css/app-modern.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
|
||||||
|
|
||||||
<link href="<?php echo base_url()?>/assets/css/bootstrap-modern-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
|
<link href="<?php echo base_url()?>public/assets/css/bootstrap-modern-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
|
||||||
<link href="<?php echo base_url()?>/assets/css/app-modern-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
|
<link href="<?php echo base_url()?>public/assets/css/app-modern-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
|
||||||
|
|
||||||
<!-- icons -->
|
<!-- icons -->
|
||||||
<link href="<?php echo base_url()?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url()?>public/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||||
<style>
|
<style>
|
||||||
/* Override toastr font color */
|
/* Override toastr font color */
|
||||||
.toast-warning {
|
.toast-warning {
|
||||||
@ -58,21 +58,21 @@
|
|||||||
<div class="logo-box">
|
<div class="logo-box">
|
||||||
<a href="index.html" class="logo logo-dark text-center">
|
<a href="index.html" class="logo logo-dark text-center">
|
||||||
<span class="logo-sm">
|
<span class="logo-sm">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/The-Mechanic-Yellow.png" alt="" height="24">
|
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="24">
|
||||||
<!-- <span class="logo-lg-text-light">Minton</span> -->
|
<!-- <span class="logo-lg-text-light">Minton</span> -->
|
||||||
</span>
|
</span>
|
||||||
<span class="logo-lg">
|
<span class="logo-lg">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/The-Mechanic-Yellow.png" alt="" height="20">
|
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20">
|
||||||
<!-- <span class="logo-lg-text-light">M</span> -->
|
<!-- <span class="logo-lg-text-light">M</span> -->
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="index.html" class="logo logo-light text-center">
|
<a href="index.html" class="logo logo-light text-center">
|
||||||
<span class="logo-sm">
|
<span class="logo-sm">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/The-Mechanic-Yellow.png" alt="" height="24">
|
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="24">
|
||||||
</span>
|
</span>
|
||||||
<span class="logo-lg">
|
<span class="logo-lg">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/The-Mechanic-Yellow.png" alt="" height="20">
|
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20">
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -214,11 +214,7 @@
|
|||||||
<li class="menu-title mt-2">Apps</li>
|
<li class="menu-title mt-2">Apps</li>
|
||||||
<li> <a href="<?php echo base_url('business_index') ?>"><i class="ri-layout-line"></i><span> Business </span></a></li>
|
<li> <a href="<?php echo base_url('business_index') ?>"><i class="ri-layout-line"></i><span> Business </span></a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo base_url('index') ?>">
|
<a href="<?php echo base_url('index') ?>"><i class="fas fa-user"></i><span> Users</span></a></li>
|
||||||
<i class="fas fa-user"></i>
|
|
||||||
<span> Users</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
@ -314,21 +310,21 @@
|
|||||||
<div class="logo-box">
|
<div class="logo-box">
|
||||||
<a class="logo logo-dark text-center">
|
<a class="logo logo-dark text-center">
|
||||||
<span class="logo-sm">
|
<span class="logo-sm">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/favicon.ico" alt="" height="24" style="width: 50px; height: 45px;" >
|
<img src="<?php echo base_url(); ?>public/assets/images/favicon.ico" alt="" height="24" style="width: 50px; height: 45px;" >
|
||||||
<!-- <span class="logo-lg-text-light">Minton</span> -->
|
<!-- <span class="logo-lg-text-light">Minton</span> -->
|
||||||
</span>
|
</span>
|
||||||
<span class="logo-lg">
|
<span class="logo-lg">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/The-Mechanic-Yellow.png" alt="" height="20" style="width: 170px; height: 55px;">
|
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20" style="width: 170px; height: 55px;">
|
||||||
<!-- <span class="logo-lg-text-light">M</span> -->
|
<!-- <span class="logo-lg-text-light">M</span> -->
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="logo logo-light text-center">
|
<a class="logo logo-light text-center">
|
||||||
<span class="logo-sm">
|
<span class="logo-sm">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/favicon.ico" alt="" height="24" style="width: 50px; height: 45px;">
|
<img src="<?php echo base_url(); ?>public/assets/images/favicon.ico" alt="" height="24" style="width: 50px; height: 45px;">
|
||||||
</span>
|
</span>
|
||||||
<span class="logo-lg">
|
<span class="logo-lg">
|
||||||
<img src="<?php echo base_url(); ?>/assets/images/The-Mechanic-Yellow.png" alt="" height="20" style="width: 170px; height: 55px;">
|
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20" style="width: 170px; height: 55px;">
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -8,17 +8,17 @@
|
|||||||
<meta content="Coderthemes" name="author" />
|
<meta content="Coderthemes" name="author" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<!-- App favicon -->
|
<!-- App favicon -->
|
||||||
<link rel="shortcut icon" href="<?php base_url()?>assets/images/favicon.ico">
|
<link rel="shortcut icon" href="<?php base_url()?>public/assets/images/favicon.ico">
|
||||||
|
|
||||||
<!-- App css -->
|
<!-- App css -->
|
||||||
<link href="<?php base_url()?>assets/css/bootstrap-modern.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
|
<link href="<?php base_url()?>public/assets/css/bootstrap-modern.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
|
||||||
<link href="<?php base_url()?>assets/css/app-modern.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
|
<link href="<?php base_url()?>public/assets/css/app-modern.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
|
||||||
|
|
||||||
<link href="<?php base_url()?>assets/css/bootstrap-modern-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
|
<link href="<?php base_url()?>public/assets/css/bootstrap-modern-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
|
||||||
<link href="<?php base_url()?>assets/css/app-modern-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
|
<link href="<?php base_url()?>public/assets/css/app-modern-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
|
||||||
|
|
||||||
<!-- icons -->
|
<!-- icons -->
|
||||||
<link href="<?php base_url()?>assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php base_url()?>public/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<div class="auth-logo">
|
<div class="auth-logo">
|
||||||
<a class="logo text-center">
|
<a class="logo text-center">
|
||||||
<span class="logo-lg">
|
<span class="logo-lg">
|
||||||
<img src="<?php base_url()?>assets/images/logo.png" alt="" height="22" style="width: 305px; height: 190px;">
|
<img src="<?php base_url()?>public/assets/images/logo.png" alt="" height="22" style="width: 305px; height: 190px;">
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@ -92,10 +92,10 @@
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- Vendor js -->
|
<!-- Vendor js -->
|
||||||
<script src="<?php base_url()?>assets/js/vendor.min.js"></script>
|
<script src="<?php base_url()?>public/assets/js/vendor.min.js"></script>
|
||||||
|
|
||||||
<!-- App js -->
|
<!-- App js -->
|
||||||
<script src="<?php base_url()?>assets/js/app.min.js"></script>
|
<script src="<?php base_url()?>public/assets/js/app.min.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
87
index.php
Normal file
87
index.php
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Check PHP version.
|
||||||
|
$minPhpVersion = '7.4'; // If you update this, don't forget to update `spark`.
|
||||||
|
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
|
||||||
|
$message = sprintf(
|
||||||
|
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
|
||||||
|
$minPhpVersion,
|
||||||
|
PHP_VERSION
|
||||||
|
);
|
||||||
|
|
||||||
|
exit($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Path to the front controller (this file)
|
||||||
|
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
|
// Ensure the current directory is pointing to the front controller's directory
|
||||||
|
if (getcwd() . DIRECTORY_SEPARATOR !== FCPATH) {
|
||||||
|
chdir(FCPATH);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*---------------------------------------------------------------
|
||||||
|
* BOOTSTRAP THE APPLICATION
|
||||||
|
*---------------------------------------------------------------
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Load our paths config file
|
||||||
|
// This is the line that might need to be changed, depending on your folder structure.
|
||||||
|
require FCPATH . '/app/Config/Paths.php';
|
||||||
|
// ^^^ Change this line if you move your application folder
|
||||||
|
|
||||||
|
$paths = new Config\Paths();
|
||||||
|
|
||||||
|
// Location of the framework bootstrap file.
|
||||||
|
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();
|
||||||
|
|
||||||
|
// 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
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The CodeIgniter class contains the core functionality to make
|
||||||
|
* the application run, and does all 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);
|
||||||
|
|
||||||
|
/*
|
||||||
|
*---------------------------------------------------------------
|
||||||
|
* LAUNCH THE APPLICATION
|
||||||
|
*---------------------------------------------------------------
|
||||||
|
* Now that everything is set up, it's time to actually fire
|
||||||
|
* up the engines and make this app do its thang.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$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);
|
||||||
Loading…
Reference in New Issue
Block a user