dd.fun.php,帝国CMS强制下载txt文件浏览器带下载进度显示

一般来说,下载txt会直接打开,把下面的代码放入到下载页面中,就提示下载并可以进度保存了!文件位置(\e\DownSys\class\DownSysFun.php)

找到如下代码(帝国CMS7.5 大概203行左右)

//下载

Header("Content-type: application/octet-stream");

//Header("Accept-Ranges: bytes");

//Header("Accept-Length: ".$filesize);

Header("Content-Disposition: attachment; filename=".$filename);

echo ReadFiletext($file);

改成如下代码:(注意UTF8编码请用编辑器打开修改)

//下载

$filesize=filesize($file);

Header('Pragma:public');

Header('Last-Modified:'.gmdate('D,dMYH:i:s').'GMT');

Header('Cache-Control:no-store,no-cache,must-revalidate');

Header('Cache-Control:pre-check=0,post-check=0,max-age=0');

Header('Content-Transfer-Encoding:binary');

Header('Content-Encoding:none');

Header("Content-type:application/octet-stream");

Header("Content-Disposition:attachment;filename=".$filename);

Header('Content-length:'.$filesize);

echoReadFile($file);

ad51e517755f8fd6a7ec83ced4ecfaf3.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
《land of lisp》,英文版(目前无英译)。pdf文档,清晰,超赞的lisp书籍。学习后,建议买实体书进行收藏。 内容缩略: BRIEF CONTENTS Acknowledgments........................................................................................................xvii Introduction....................................................................................................................1 SECTION I: LISP IS POWER Chapter 1: Getting Started with Lisp................................................................................15 Chapter 2: Creating Your First Lisp Program.....................................................................21 Chapter 3: Exploring the Syntax of Lisp Code...................................................................31 SECTION II: LISP IS SYMMETRY Chapter 4: Making Decisions with Conditions..................................................................49 Chapter 5: Building a Text Game Engine.........................................................................67 Chapter 6: Interacting with the World: Reading and Printing in Lisp....................................85 Chapter 6.5: lambda: A Function So Important It Deserves Its Own Chapter.......................103 Chapter 7: Going Beyond Basic Lists.............................................................................107 Chapter 8: This Ain!ˉt Your Daddy!ˉs Wumpus..................................................................1 Chapter 9: Advanced Datatypes and Generic Programming............................................153 SECTION III: LISP IS HACKING..................................................................................191 Chapter 10: Looping with the loop Command................................................................195 Chapter 11: Printing Text with the format Function...........................................................221 Chapter 12: Working with Streams...............................................................................237 Chapter 13: Let!ˉs Create a Web Server!........................................................................25 Functional Programming Is Beautiful ..............................................................................269 SECTION IV: LISP IS SCIENCE Chapter 14: Ramping Lisp Up a Notch with Functional Programming................................291 Chapter 15: Dice of Doom, a Game Written in the Functional Style..................................303 Chapter 16: The Magic of Lisp Macros..........................................................................339 Chapter 17: Domain-Specific Languages........................................................................355 Chapter 18: Lazy Programming....................................................................................375 Chapter 19: Creating a Graphical, Web-Based Version of Dice of Doom..........................401 Chapter 20: Making Dice of Doom More Fun.................................................................417 Epilogue....................................................................................................................429 Index.........................................................................................................................465
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值