<?php
$file = @ fopen($file_dir . $file_name,"r");
$filesize=filesize($file_dir.$file_name);
header('Content-Description:File Transfer');
header("Content-Type:application/octet-stream");
header('Content-Transfer-Encoding:binary');
header("Accept-Ranges: bytes");
header('Expires:0');
header('Cache-Control:must-revalidate');
header('Pragma:public');
header("Content-Length:".$filesize);
header("Content-Disposition:attachment;filename=".$file_name);
ob_start();
fseek($file,0);
while (!feof($file)) {
set_time_limit(0);
print (fread($file, 1024 * 8)); ob_flush();
flush();
}
fclose($file);

最新文章

  1. Rasterizer Stage(读书笔记3 --- Real-Time rendering)
  2. SQL简单语句总结习题
  3. Windows Azure Redis 缓存服务
  4. JavaScript学习笔记- 正则表达式常用字符集及方法
  5. Lingo 做线性规划 - Revenue Management
  6. Assets/Sciprts/GameSciprt.js(97,46): BCE0044: expecting :, found &#39;,&#39;.
  7. Jquery 多选下拉列表插件jquery multiselect
  8. [AC自动机]题目合计
  9. 配置IIS服务器,APK文件下载
  10. LRU与MRU算法
  11. kafka环境搭建2-broker集群+zookeeper集群(转)
  12. window scipy install
  13. JS function立即调用的几种写法
  14. [js高手之路] html5 canvas教程 - 制作一个数码倒计时效果
  15. Bzoj4199:[NOI2015]品酒大会
  16. log4j详细配置
  17. openSUSE安装Qt5
  18. Hadoop序列化-流量汇总案例
  19. Latex 问题解决
  20. MySQL主从1205报错【转】

热门文章

  1. openstack如何整合vmare最佳方案
  2. vue.js学习之 如何在手机上查看vue-cli构建的项目
  3. Python3.5在Windows7环境下Scrapy库的安装
  4. 20145214 《Java程序设计》第1周学习总结
  5. 2019寒假训练营第三次作业part1-网络空间安全概论第五章
  6. lintcode-184-最大数
  7. 记一次dll强命名冲突事件
  8. MVC4 DropDownList (二) — 省市联动
  9. nginx 设置默认虚拟 host
  10. Angular-Cli中引用第三方库