ensure add realpath() in spark

This commit is contained in:
Abdul Malik Ikhsan 2020-08-23 14:48:05 +07:00
parent b98eac7268
commit e36605e4be
No known key found for this signature in database
GPG Key ID: 23FCCC74D1442CAE

6
spark
View File

@ -30,10 +30,10 @@ if (strpos(php_sapi_name(), 'cgi') === 0)
}
// Path to the front controller
define('FCPATH', __DIR__ . '/public' . DIRECTORY_SEPARATOR);
define('FCPATH', realpath(__DIR__ . '/public' . DIRECTORY_SEPARATOR));
// Load our paths config file
require 'app/Config/Paths.php';
require realpath('app/Config/Paths.php');
// ^^^ Change this line if you move your application folder
$paths = new Config\Paths();
@ -41,7 +41,7 @@ $paths = new Config\Paths();
// Ensure the current directory is pointing to the front controller's directory
chdir(FCPATH);
$app = require rtrim($paths->systemDirectory, '/ ') . '/bootstrap.php';
$app = require realpath(rtrim($paths->systemDirectory, '/ ') . '/bootstrap.php');
// Grab our Console
$console = new \CodeIgniter\CLI\Console($app);