Files
ICEcoder/lib/download.php
Matt Pass a3c0243772 Include headers lib & csrf hidden form field
To help protect against CSRF and clickjacking
Also include hidden form field containing this for postback
top.ICEcoder.csrf also set
2014-04-18 17:57:54 +01:00

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;
}
?>