42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
||
/**
|
||
* HexaHost – Bootstrap für Monorepo- und Produktions-Layout
|
||
*
|
||
* Monorepo: public/../backend/{includes,config}
|
||
* Produktion: public/{includes,config} (nach Backend-Kopie)
|
||
*/
|
||
|
||
if (!defined('HEXAHOST_BOOTSTRAPPED')) {
|
||
$pathCandidates = [
|
||
[
|
||
'includes' => __DIR__ . '/includes',
|
||
'config' => __DIR__ . '/config',
|
||
],
|
||
[
|
||
'includes' => __DIR__ . '/../backend/includes',
|
||
'config' => __DIR__ . '/../backend/config',
|
||
],
|
||
];
|
||
|
||
$resolved = false;
|
||
|
||
foreach ($pathCandidates as $paths) {
|
||
if (is_file($paths['includes'] . '/functions.php')) {
|
||
define('HEXAHOST_INCLUDES_DIR', $paths['includes']);
|
||
define('HEXAHOST_CONFIG_DIR', $paths['config']);
|
||
require_once $paths['includes'] . '/functions.php';
|
||
$resolved = true;
|
||
break;
|
||
}
|
||
}
|
||
|
||
if (!$resolved) {
|
||
http_response_code(500);
|
||
header('Content-Type: text/plain; charset=utf-8');
|
||
echo 'HexaHost: Anwendung konnte nicht gestartet werden (includes nicht gefunden).';
|
||
exit;
|
||
}
|
||
|
||
define('HEXAHOST_BOOTSTRAPPED', true);
|
||
}
|