Maison > Article > développement back-end > PHP导出xls问题
<?header("Content-type:application/vnd.ms-excel");header("Content-Disposition:filename=test.xls");echo "test1 ";echo "test2";echo "test1";echo "test2";echo "test1";echo "test2";echo "test1";echo "test2";echo "test1";echo "test2";echo "test1";echo "test2";?>
少了点东西,大小和什么东西吧、
header("Content-type:application/octet-stream"); header("Accept-Ranges:bytes"); header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:attachment;filename=".$filename.".xls"); header("Pragma: no-cache"); header("Expires: 0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header('Content-Disposition:inline;filename="'.$FileName.'"');
header("Content-Transfer-Encoding: binary");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");
借别人的代码