Fix: bootstrap.php autoload path detects vendor location (same dir vs parent dir) for flat server layout

This commit is contained in:
Pontoporeia
2026-05-20 13:10:21 +02:00
parent d33a56981e
commit a251aeb500
2 changed files with 6 additions and 2 deletions

View File

@@ -4,8 +4,11 @@
* Simple configuration for website
*/
// Composer autoloader
require_once __DIR__ . '/../vendor/autoload.php';
// Composer autoloader (vendor/ may be sibling dir in dev or same dir in prod)
$autoloadPath = file_exists(__DIR__ . '/vendor/autoload.php')
? __DIR__ . '/vendor/autoload.php'
: __DIR__ . '/../vendor/autoload.php';
require_once $autoloadPath;
// Define application root
define('APP_ROOT', __DIR__);