📄 download.php
字号:
<?php
/*
[Mcncc] (C)2006 Comsenz Inc.
$Author: 执着 $
$E-Mail: mylove@mcncc.com $
$HomePage: http://www.mcncc.com $
$Blog: http://blog.mcncc.com $
$Date: 2006/4/29 21:35 $
*/
require 'config.php';
require 'db.php';
$db=new db;
$db->connect($dbhost, $dbuser, $dbpwd, $dbname);
$Mcncc=$_POST['Mcncc'];
$res=$db->query("select count(*) from list where code='".$Mcncc."'");
$count=$db->fetch_row($res);
if(!$count[0])
{
echo "没这个提取码";
}
else
{
$sql="select file from list where code='".$Mcncc."'";
$res=$db->query($sql);
$tmp=$db->fetch_row($res);
$filename=$uploaddir.$tmp[0];
$realname=substr($tmp[0],0,-5);
$str='Content-Disposition: attachment; filename="'.$realname.'"';
header("Content-type: application/force-download");
header($str);
readfile($filename);
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -