$line) {
switch (TRUE) {
case strpos($line, '#include') :
preg_match('/"(.+?)"/', $line, $matches);
if ($matches[1]) {
$inc = __DIR__ . '/' . $matches[1];
if (file_exists($inc))
$body[$key] = file_get_contents($inc);
}
break;
// Thursday, 25-Apr-2024 06:26:43 UTC
case strpos($line, 'DATE_LOCAL') :
$date = date('l, d-M-Y H:i:s T');
$line = str_replace('Thursday, 25-Apr-2024 06:26:43 UTC', $date, $line);
$body[$key] = $line;
break;
default :
// do nothing
}
}
$html = implode("\n", $body);
echo $html;