Software
v0.0..1
This commit is contained in:
15
software/v0.0.1/web/log.php
Normal file
15
software/v0.0.1/web/log.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
header('Content-Type: text/plain; charset=utf-8');
|
||||
|
||||
$log = dirname(__DIR__) . '/data/bot.log';
|
||||
|
||||
if (file_exists($log)) {
|
||||
$content = file_get_contents($log);
|
||||
if ($content === false) {
|
||||
echo 'Kunne ikke læse logfilen.';
|
||||
} else {
|
||||
echo $content;
|
||||
}
|
||||
} else {
|
||||
echo 'Ingen log endnu.';
|
||||
}
|
||||
Reference in New Issue
Block a user