2024-03-11 17:52:34 +00:00
|
|
|
<?php
|
2023-10-31 20:31:27 +00:00
|
|
|
|
|
|
|
require '../../includes/csrf.php';
|
2023-10-31 22:18:23 +00:00
|
|
|
require_once '../../includes/config.php';
|
2024-03-11 17:52:34 +00:00
|
|
|
require_once '../../src/RaspAP/Auth/HTTPAuth.php';
|
|
|
|
require_once '../../includes/authenticate.php';
|
2023-10-31 20:31:27 +00:00
|
|
|
|
2023-12-31 08:03:19 +00:00
|
|
|
$tempDir = sys_get_temp_dir();
|
|
|
|
$filePath = $tempDir . DIRECTORY_SEPARATOR . RASPI_DEBUG_LOG;
|
2023-10-31 20:31:27 +00:00
|
|
|
|
2023-12-31 08:03:19 +00:00
|
|
|
if (isset($filePath)) {
|
2023-10-31 20:31:27 +00:00
|
|
|
header('Content-Type: application/octet-stream');
|
|
|
|
header('Content-Disposition: attachment; filename='.basename($filePath));
|
|
|
|
header('Expires: 0');
|
|
|
|
header('Cache-Control: must-revalidate');
|
|
|
|
header('Pragma: public');
|
|
|
|
header('Content-Length: '.filesize($filePath));
|
|
|
|
readfile($filePath);
|
|
|
|
exit();
|
|
|
|
} else {
|
|
|
|
header('Location: '.'/system_info');
|
|
|
|
exit();
|
|
|
|
}
|