后缀为下载类型
加上下面的代码也可以将认识的类型该为下载提示:Header( "Content-Type: application/x-".$Ream); 
Header( "Content-Length: ".filesize($FilePath)); //文件大小
Header( "Content-Disposition: attachment; filename=".$FileName);//文件名称这样:)

解决方案 »

  1.   


        if(strpos(getenv("HTTP_USER_AGENT") , "MSIE")){
            header("Content-type: application/download");
            header("Content-Disposition: filename=$name");
            header("Cache-Control: store, cache, must-revalidate, post-check=0, pre-check=0");
            header("Keep-Alive: close");
        }
        else
        {    
            header("Cache-Control: store, cache, must-revalidate, post-check=0, pre-check=0");
            header("Content-type: application/octet-stream");
            header("Content-Disposition: attachment;filename=$name");
        }    
      

  2.   

    up
    同xuzuning(唠叨)的做法.
      

  3.   

    header("Content-Disposition: inline; filename=$Filename.$ext");
    header("Content-type: application/octet-stream");
    header("Pragma: no-cache");
    header("Expires: 0");试试看
      

  4.   

    同意 xuzuning(唠叨)的方法
      

  5.   

    其中最重要的是
    header("Content-Disposition: inline; filename=$Filename.$ext");
    内的参数
    attachment而不要使用inline!!除非用户没装与这个文件关联的程序,否则会在页面(浏览器)内打开的.