作者:杯中水1129_909 | 来源:互联网 | 2018-07-17 13:35
ec(2);$file_dir$totalDirectory; $file_name$filename; echo.db.$file_dir.$file_name; if(file_exists($file_dir.
$file_dir=$totalDirectory;
$file_name=$filename;
//echo ''./db/''.$file_dir.$file_name;
if (file_exists($file_dir.$file_name)){
$file=fopen($file_dir.$file_name,''r'');
Header(''Content-type:application/octet-stream'');
Header(''Accept-Ranges:bytes'');
Header(''Content-Disposition:attachment;filename=''.$file_name);
echo fread($file,filesize($file_dir.$file_name));
fclose($file);
exit;
}else{
echo ''file is not exists'';
}