php文件下载处理方法分析 |
本文标签:php,文件下载,处理方法 本文实例讲述了php文件下载的处理方法 。分享给大家供大家参考 。具体分析如下: php能够处理多种条件的文件下载,先来看下面示例: <?php header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=testname.jpg"); readfile("images/test.jpg"); ?> 分析上述代码: 第一行代码是强制下载; <iframe src="1.zip" style="border-style:none;width:0;height:0;"> </iframe> <iframe src="2.zip" style="border-style:none;width:0;height:0;"> </iframe> 也可以用js生成iframe 希望本文所述对大家的php程序设计有所帮助 。 |