2011-04-04 38 views

回答

0

假設你正在使用PHP:

header('Content-Type: application/vnd.ms-excel;'); 
header('Content-type: application/x-msexcel'); 
header('Content-Disposition: attachment; filename="your_xls_on_the_server.xls";'); 
header("Content-Transfer-Encoding: binary"); 
header("Content-Length: " . filesize('your_xls_on_the_server.xls')); 
ob_clean(); 
flush(); 
readfile('your_xls_on_the_server.xls'); 
exit; 
相關問題