header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:attachment;filename=$date.xls"); 。前面有输出 掩面。