Header("Content-type: application/excel");

解决方案 »

  1.   

    if (file_exists($filename)){
    header("Content-type: application/file");
    header("Content-Disposition: attachment; filename={$workid}.xls");//缺省文件保存??框中的文件名?
    readfile("http://xxx.com/temp/{$workid}.xls");
    }
    else  exit();
      

  2.   

    还是不行呀,说无法下载PHP文件,站点不可用
    可我不要下PHP,我要下EXCEL
    是不是和TOMCAT的配置有关系啊?
      

  3.   

    是APACHE HTTP2.0的服务器
    和配置有关系吗?