WIP Suche implementiert, sowie Sortieren der Ergebnisse #19
@@ -4,8 +4,21 @@
|
||||
//require_once '/../model/ArticleManager.php';
|
||||
|
||||
//test
|
||||
require_once dirname(__DIR__, 2) . '/model/LocalArticleManager.php';
|
||||
require_once dirname(__DIR__, 2) . '/model/ArticleManager.php';
|
||||
$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"])) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user