mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
File added to download specified file
This commit is contained in:
14
lib/download.php
Normal file
14
lib/download.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php include("settings.php");?>
|
||||
<?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;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user