$backendIncludes, 'config' => $backendConfig], ['includes' => $publicIncludes, 'config' => $publicConfig], ['includes' => $publicIncludes, 'config' => $backendConfig], ['includes' => $backendIncludes, 'config' => $publicConfig], ]; } function hexahost_is_app_root_valid(string $includesDir, string $configDir): bool { $required = [ $includesDir . '/functions.php', $includesDir . '/header.php', $includesDir . '/footer.php', $configDir . '/products-config.php', ]; foreach ($required as $file) { if (!is_file($file)) { return false; } } return true; } $resolved = false; foreach (hexahost_path_candidates() as $paths) { if (!hexahost_is_app_root_valid($paths['includes'], $paths['config'])) { continue; } 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/html; charset=utf-8'); echo '
PHP konnte die Anwendungsdateien nicht finden.
'; echo 'Dev-Branch: Repository mit Ordner backend/ neben public/ deployen.
Produktion: Vor dem Upload scripts/sync-backend-to-public.ps1 ausführen ';
echo 'oder backend/includes und backend/config nach public/ kopieren.