Aktualisierung

This commit is contained in:
rirat-0
2026-06-02 14:07:33 +02:00
parent 8e9e7d65d0
commit 604dbeca93
+4 -20
View File
@@ -1,23 +1,7 @@
<?php <?php
//session_start(); session_start();
//require_once '/../model/LocalArticleManager.php'; require_once '/../model/LocalArticleManager.php';
//require_once '/../model/ArticleManager.php'; require_once '/../model/ArticleManager.php';
//test
$modelPath1 = dirname(__DIR__, 2) . '/model/LocalArticleManager.php';
$modelPath2 = dirname(__DIR__, 2) . '/model/ArticleManager.php';
if (file_exists($modelPath1) && file_exists($modelPath2)) {
include_once $modelPath1;
include_once $modelPath2;
} else {
// Falls die Pfade falsch berechnet wurden, stürzt die Seite nicht ab, sondern zeigt das an:
echo "<div style='background: #ffedd5; color: #9a3412; padding: 15px; border: 2px solid #f97316; font-family: Arial;'>";
echo "<strong>Controller-Fehler:</strong> Die Model-Dateien wurden nicht gefunden.<br>";
echo "Gesuchter Pfad 1: <code>" . htmlspecialchars($modelPath1) . "</code><br>";
echo "Gesuchter Pfad 2: <code>" . htmlspecialchars($modelPath2) . "</code>";
echo "</div>";
}
if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) { if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) {
@@ -42,5 +26,5 @@ if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) {
} }
} }
//
?> ?>