📄 down.php
字号:
<?php
require "./global.php";
if($downid) $query = $db->getone("SELECT tempname,savename,type FROM xydw_up WHERE id='$downid'");
if(!$query) msg('down_no','index.php');
$type == 1 ? $downfile = R_P.$rootindex['updir']."/pic/".$query['savename'] : $downfile = R_P.$rootindex['updir']."/".$query['savename'];
if(file_exists($downfile)){
$filesize = filesize($downfile);
$filelast = substr(strrchr($query['savename'],'.'),1);
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')!==false && $filelast == 'torrent' ){
$attachment='inline';
} else{
$attachment='attachment';
}
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Pragma: no-cache');
header('Content-Encoding: none');
header('Content-Disposition: '.$attachment.'; filename='.$query['tempname']);
header('Content-Length: '.$filesize);
header('Content-type:'.$filelast);
echo readover($downfile);
} else {
msg('down_no','index.php');
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -