mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
Use separate debug files and prevent direct access
This commit is contained in:
parent
51f985c215
commit
4e2535624d
3 changed files with 12 additions and 4 deletions
|
|
@ -209,8 +209,16 @@ class DisplayHandler extends Handler
|
|||
$content = ob_get_clean();
|
||||
if ($display_type === 'file')
|
||||
{
|
||||
$debug_file = RX_BASEDIR . 'files/_debug_message.php';
|
||||
FileHandler::writeFile($debug_file, $content, 'a');
|
||||
$debug_file = RX_BASEDIR . 'files/debug/' . getInternalDateTime(RX_TIME, 'Ymd') . '.php';
|
||||
if (!file_exists($debug_file) || !filesize($debug_file))
|
||||
{
|
||||
$phpheader = '<?php exit; ?>' . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpheader = '';
|
||||
}
|
||||
FileHandler::writeFile($debug_file, $phpheader . $content, 'a');
|
||||
return '';
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue