📄 download.php
字号:
<?PHP
//dirLIST v0.2.0 file download script
set_time_limit(0);
$file_path = "../".base64_decode($_GET['file']);
require("config.php");
if(file_exists($file_path) && is_file($file_path))
{
$fname = ereg_replace( ' +', '-', basename($file_path));
header('Cache-control: private');
header('Content-Type: application/octet-stream');
header('Content-Length: '.filesize($file_path));
header('Content-Disposition: attachment; filename='.$fname);
flush();
$file = fopen($file_path, "r");
while(!feof($file))
{
echo fread($file, round($speed*1024, 0));
flush();
sleep(1);
}
fclose($file);
}
else
die('Error: The file <b>'.basename($file_path).'</b> does not exist. Please go back and select a file');
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -