mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Set CI_ENVIRONMENT before return false if uri is /index.php
This commit is contained in:
parent
fc6bf768d8
commit
fcce6ff40c
@ -8,6 +8,10 @@
|
||||
* functionality so the site will operate as normal.
|
||||
*/
|
||||
|
||||
// If we're serving the site locally, then we need
|
||||
// to let the application know that we're in development mode
|
||||
$_SERVER['CI_ENVIRONMENT'] = 'development';
|
||||
|
||||
$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
|
||||
|
||||
$path = __DIR__.'/public/'.ltrim($uri,'/');
|
||||
@ -21,9 +25,4 @@ if ($uri !== '/' && (is_file($path) || is_dir($path)))
|
||||
|
||||
// Otherwise, we'll load the index file and let
|
||||
// the framework handle the request from here.
|
||||
|
||||
// If we're serving the site locally, then we need
|
||||
// to let the application know that we're in development mode
|
||||
$_SERVER['CI_ENVIRONMENT'] = 'development';
|
||||
|
||||
require_once __DIR__.'/public/index.php';
|
||||
|
Loading…
x
Reference in New Issue
Block a user