一聚教程网:一个值得你收藏的教程网站

热门教程

jsp文件下载程序

时间:2022-07-02 17:59:37 编辑:袖梨 来源:一聚教程网

jsp文件下载程序
function file_down($filepath, $filename = '')

{

 if(!$filename) $filename = basename($filepath);

 if(is_ie()) $filename = rawurlencode($filename);

 $filetype = fileext($filename);

 $filesize = sprintf("%u", filesize($filepath));

 if(ob_get_length() !== false) @ob_end_clean();

 header('Pragma: public');

 header('Last-Modified: '.gmdate('D, d M Y H: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');

 h

热门栏目