diff --git a/public/index.php b/public/index.php index cd60baeb11eb..77373025f96d 100644 --- a/public/index.php +++ b/public/index.php @@ -17,8 +17,9 @@ // Load our paths config file // This is the line that might need to be changed, depending on your folder structure. -require realpath(FCPATH . '../app/Config/Paths.php') ?: FCPATH . '../app/Config/Paths.php'; +$pathsConfig = FCPATH . '../app/Config/Paths.php'; // ^^^ Change this if you move your application folder +require realpath($pathsConfig) ?: $pathsConfig; $paths = new Config\Paths(); diff --git a/spark b/spark index c4ad645a366b..f62aeddb2978 100755 --- a/spark +++ b/spark @@ -33,8 +33,9 @@ if (strpos(PHP_SAPI, 'cgi') === 0) define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR); // Load our paths config file -require realpath('app/Config/Paths.php') ?: 'app/Config/Paths.php'; +$pathsConfig = 'app/Config/Paths.php'; // ^^^ Change this line if you move your application folder +require realpath($pathsConfig) ?: $pathsConfig; $paths = new Config\Paths(); diff --git a/user_guide_src/source/general/managing_apps.rst b/user_guide_src/source/general/managing_apps.rst index 3f412c8fa886..c1781e032fa0 100644 --- a/user_guide_src/source/general/managing_apps.rst +++ b/user_guide_src/source/general/managing_apps.rst @@ -23,14 +23,14 @@ they can find the ``Paths`` configuration file: - ``/spark`` runs command line apps; the path is specified on or about line 36:: - require realpath('app/Config/Paths.php') ?: 'app/Config/Paths.php'; - // ^^^ Change this if you move your application folder + $pathsConfig = 'app/Config/Paths.php'; + // ^^^ Change this line if you move your application folder - ``/public/index.php`` is the front controller for your webapp; the config path is specified on or about line 20:: - require realpath(FCPATH . '../app/Config/Paths.php') ?: FCPATH . '../app/Config/Paths.php'; + $pathsConfig = FCPATH . '../app/Config/Paths.php'; // ^^^ Change this if you move your application folder