源文件名称:out_test.php我在这个文件里面写下如下代码:
<?php 
header("Content-type:application/vnd.ms-excel"); 
header("Content-Disposition:attachment;filename=news.xls"); 
?>
可无论我把"news.xls"的名字改成什么,导出的文件名提示的都是out_test.xls这样的弹出框提示,请高手指点指点问题所在~~谢谢

解决方案 »

  1.   

    header('Content-Disposition: attachment; filename="news.xls"'); 
      

  2.   

    还是一样的问题。 filename 似乎都没起作用~·
      

  3.   


    header("Content-type: application/vnd.ms-excel; charset=gbk");//utf-8
    header("Content-Disposition: attachment; filename=123.xls");
      

  4.   

    header("Content-Disposition:attachment;filename=news.xls");  确认下,这句header之后,还有没有类似的header语句
      

  5.   

    header('Cache-Control: no-cache, must-revalidate');
    header('Content-type: application/vnd.ms-excel');
    header('Content-Disposition: filename=news.xls');