mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
fix undefined variable path on CLI
This commit is contained in:
parent
4566baf3d6
commit
005d88c8d6
8
ci.php
8
ci.php
@ -30,6 +30,10 @@ if (substr(php_sapi_name(), 0, 3) == 'cgi')
|
||||
// Location to the Paths config file.
|
||||
$pathsPath = 'application/Config/Paths.php';
|
||||
|
||||
// Load our paths config file
|
||||
require $pathsPath;
|
||||
$paths = new Config\Paths();
|
||||
|
||||
$public = trim($paths->publicDirectory, '/');
|
||||
|
||||
// Path to the front controller
|
||||
@ -38,10 +42,6 @@ define('FCPATH', realpath($public).DIRECTORY_SEPARATOR);
|
||||
// Ensure the current directory is pointing to the front controller's directory
|
||||
chdir('public');
|
||||
|
||||
// Load our paths config file
|
||||
require $pathsPath;
|
||||
$paths = new Config\Paths();
|
||||
|
||||
$app = require rtrim($paths->systemDirectory,'/ ').'/bootstrap.php';
|
||||
|
||||
// Grab our Console
|
||||
|
Loading…
x
Reference in New Issue
Block a user