function getLog($name) { $fn = pathinfo(strip_tags($_GET['show'])); if (!file_exists($fn['filename'])) { die('you should not do bad requests'); } $c = file_get_contents($_GET['show'], "r"); return return_formated($c); }
/** * Ich lese die Daten aus der Datei mit dem uebergebenen Namen ein */ function getLog($name) { $fn = pathinfo(strip_tags($_GET['show'])); $fn = $fn['filename']; if ($fn == "latest") { $fn = getLatestFile(); } if (!is_file(LOGDIR . $fn)) { die('you should not do bad requests'); } $c = file_get_contents(LOGDIR . $fn, "r"); return return_formated($c); }