Debug
This commit is contained in:
@@ -17,8 +17,12 @@ if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$clientIp = (string)($_SERVER['REMOTE_ADDR'] ?? '');
|
||||
}
|
||||
$clientIp = trim($clientIp);
|
||||
$accessLine = date(DATE_ATOM) . ' | ' . ($clientIp !== '' ? $clientIp : 'unknown') . "\n";
|
||||
@file_put_contents($debugDir . '/last_access.log', $accessLine);
|
||||
$version = $GLOBALS['app_version'] ?? '';
|
||||
$versionLabel = $version ? (' | v' . $version) : '';
|
||||
$accessLine = date(DATE_ATOM) . ' | ' . ($clientIp !== '' ? $clientIp : 'unknown') . $versionLabel . "\n";
|
||||
$logFile = $debugDir . '/last_access.log';
|
||||
$existing = is_file($logFile) ? (string)@file_get_contents($logFile) : '';
|
||||
@file_put_contents($logFile, $accessLine . $existing);
|
||||
|
||||
$pageTitle = 'Email Template System – Admin';
|
||||
$pageId = 'home';
|
||||
|
||||
Reference in New Issue
Block a user