Skip to content

Commit

Permalink
Reorder ci.php for better cross-system support.
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Apr 11, 2017
1 parent 992e607 commit 1765d0d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ci.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
* this class mainly acts as a passthru to the framework itself.
*/

// Location to the Paths config file.
$pathsPath = 'application/Config/Paths.php';
$public = trim($paths->publicDirectory, '/');

// Path to the front controller
define('FCPATH', realpath($public).DIRECTORY_SEPARATOR);

/*
*---------------------------------------------------------------
* BOOTSTRAP THE APPLICATION
Expand All @@ -34,6 +27,14 @@
die("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n");
}

// Location to the Paths config file.
$pathsPath = 'application/Config/Paths.php';

$public = trim($paths->publicDirectory, '/');

// Path to the front controller
define('FCPATH', realpath($public).DIRECTORY_SEPARATOR);

// Ensure the current directory is pointing to the front controller's directory
chdir('public');

Expand Down

0 comments on commit 1765d0d

Please sign in to comment.