log output as table

This commit is contained in:
EA4GKQ 2016-06-24 19:43:06 +02:00 committed by GitHub
parent 0a659bcc53
commit 675b78ae04

View file

@ -15,8 +15,8 @@ $fileName = MMDVMLOGPATH. "/MMDVM-".date(Y)."-".date(m)."-".date(d).".log";
<html lang="es"> <html lang="es">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=800px,initial-scale=0.4,maximum-scale=0.6">
<meta http-equiv="refresh" content="<?php echo REFRESHAFTER?>"> <!--<meta http-equiv="refresh" content="<?php echo REFRESHAFTER?>">-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Das neueste kompilierte und minimierte CSS --> <!-- Das neueste kompilierte und minimierte CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
@ -48,7 +48,10 @@ $fileName = MMDVMLOGPATH. "/MMDVM-".date(Y)."-".date(m)."-".date(d).".log";
<div class="panel-heading"> <div class="panel-heading">
<span class="label label-info">Fichero log <?php echo $fileName ?></span> <span class="label label-info">Fichero log <?php echo $fileName ?></span>
</div> </div>
<div class="panel-body"> <div class="table-responsive">
<table class="table table-condensed">
<tr>Log file</tr>
<?php <?php
/* /*
$fileOutput = file_get_contents($fileName, FILE_USE_INCLUDE_PATH); $fileOutput = file_get_contents($fileName, FILE_USE_INCLUDE_PATH);
@ -62,15 +65,21 @@ $file = new SplFileObject($fileName);
// Loop until we reach the end of the file. // Loop until we reach the end of the file.
while (!$file->eof()) { while (!$file->eof()) {
// Echo one line from the file. // Echo one line from the file.
echo $file->fgets(); echo"<tr>";
echo "<br>"; echo "<td>";
echo $file->fgets();
echo "</td>";
echo"</tr>\n";
} }
// Unset the file to call __destruct(), closing the file handle. // Unset the file to call __destruct(), closing the file handle.
$file = null; $file = null;
?> ?>
</table>
</div> </div>
<A NAME="TheEnd"> <A NAME="TheEnd">
</div> </div>
<div class="panel panel-info"> <div class="panel panel-info">