mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 15:24:00 +01:00
To help protect against CSRF and clickjacking Also include hidden form field containing this for postback top.ICEcoder.csrf also set
16 lines
381 B
PHP
16 lines
381 B
PHP
<?php
|
|
include("headers.php");
|
|
include("settings.php");
|
|
|
|
$file = $docRoot.$iceRoot.str_replace("|","/",$_GET['file']);
|
|
|
|
if (file_exists($file)) {
|
|
header('Content-Description: File Transfer');
|
|
header('Content-Disposition: attachment; filename='.basename($file));
|
|
header('Content-Length: '.filesize($file));
|
|
ob_clean();
|
|
flush();
|
|
readfile($file);
|
|
exit;
|
|
}
|
|
?>
|