$filename = "20090210.xls";
$file = fopen(PUBLIC_EXPORT_DIR.$filename,"r"); // 打开文件
Header("Content-type:application/force-download");
Header("Accept-Ranges:bytes");
header("Content-Type: application/msexcel");
Header("Accept-Length:".filesize(PUBLIC_EXPORT_DIR.$filename));
Header("Content-Disposition:attachment;filename=".$filename);
echo fread($file,filesize(PUBLIC_EXPORT_DIR.$filename));
fclose($file);
|