mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 11:10:08 +01:00
Fix: bootstrap.php autoload path detects vendor location (same dir vs parent dir) for flat server layout
This commit is contained in:
1 parent
d33a56981e
commit
a251aeb500
2 files changed
+6
-2
No files matched your search
+5
-2
@@ -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