日期:2014-05-17 浏览次数:20550 次
<?php header("Content-type:application/rar"); header("Content-Disposition:attachment;filename=.rar"); readfile("E:\ziptest\2.1.1-b8.rar"); ?>
#down.php $file = 'ASDFGgg.pdf'; _Download("files_dir/".$file, $file); function _Download($f_location,$f_name){ header ("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Length: ' . filesize($f_location)); header('Content-Disposition: attachment; filename=' . basename($f_name)); readfile($f_location); }
------解决方案--------------------