mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Fix: bootstrap.php autoload path detects vendor location (same dir vs parent dir) for flat server layout
This commit is contained in:
@@ -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__);
|
||||
|
||||
Reference in New Issue
Block a user