Files
HotLunches/phperrors.php
T
2026-10-19 15:22:52 -07:00

55 lines
1017 B
PHP

<?php
include "db.php";
if (array_key_exists('action', $_GET)) {
if ($_GET['action'] == 'refresh') {
shell_exec('/m/data1/app.hotlunches.net/get-phperror.sh');
}
header("Location: /phperrors.php#bottom");
exit();
}
$ValidAccess = 2010;
require_once("include/globals.php");
if ($currentURL != 'dev.hotlunches.net') {
header("Location: /");
exit();
}
?>
<html>
<head><title>PHP Errors Listing</title>
</head>
<body bgcolor="#ffffff">
<?php
$CurrentURL = strtolower($_SERVER['HTTP_HOST']);
$CurrentURL = str_replace("www.","",$CurrentURL);
echo("<p><b>$CurrentURL</b></p>\n");
echo("<pre>\n");
echo("<b>Current Log Entries</b>\n\n");
$fp = fopen("logs/php_error.log",'r');
$num = 1;
while ($line = trim(fgets($fp, 2000))) {
$line = str_replace("<","&lt;",$line);
printf("%4d: %s\n",$num,$line);
$num++;
}
//
// Display Refresh link
//
echo("\n\n");
echo("<a href='/phperrors.php?action=refresh' id='bottom'>Refresh Log Entries</a>\n\n");
echo("</pre>\n");
?>
</body>
</html>