php导出excel
1 <?php 2 header("Content-Type: application/vnd.ms-execl"); 3 header("Content-Disposition: attachment; filename=myExcel.xls"); 4 header("Pragma: no-cache"); 5 header("Expires: 0"); 6 /*first line*/ 7 echo "hello"."\t"; 8 echo "world"."\t"; 9 echo "\t\n"; 10 11 /*start of second line*/ 12 echo "this is second line"."\t"; 13 echo "Hi,pretty girl"."\t"; 14 echo "\t\n"; 15 ?>

浙公网安备 33010602011771号