Debug-Tool ist deaktiviert.';
return;
}
$debugDir = __DIR__ . '/../../debug';
if (!is_dir($debugDir)) {
echo '
Debug-Verzeichnis fehlt.
';
return;
}
$files = array_values(array_filter(scandir($debugDir) ?: [], function ($f) use ($debugDir) {
if ($f === '.' || $f === '..') return false;
$path = $debugDir . '/' . $f;
return is_file($path);
}));
$selected = (string)($_GET['file'] ?? '');
$content = null;
if ($selected !== '' && preg_match('/^[a-zA-Z0-9._-]+$/', $selected)) {
$path = $debugDir . '/' . $selected;
if (is_file($path)) {
$content = file_get_contents($path);
}
}
if (isset($_GET['list']) && $_GET['list'] === '1') {
header('Content-Type: application/json; charset=utf-8');
echo json_encode($files);
return;
}
if (isset($_GET['raw']) && $_GET['raw'] === '1') {
header('Content-Type: text/plain; charset=utf-8');
echo $content ?? '';
return;
}
?>
Debug
Debug Logs
Hier kannst du temporäre Log-Files aus dem debug/-Ordner ansehen.
Inhalt
Wähle eine Datei.
= e($content) ?>