download.php
来自「dir list................................」· PHP 代码 · 共 26 行
PHP
26 行
<?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 + =
减小字号Ctrl + -
显示快捷键?