我这都可以,不过这句最后应该是分号
$file_name="xxx.xxx":将localhost改成ip看看?

解决方案 »

  1.   

    我用window2000server+ie5.00.2920+php4.2
      

  2.   

    xxx.xxx中的内容有非法字符?
    我只是用“hehe”测试的用http://localhost/down/xxx.xxx看能不能下载还有改改你的contentType
      

  3.   

    http://localhost/down/kaiu.ttf用这种方法成功下载的一个是字体文件contentType如何更改
      

  4.   

    ContentTypezip: application/x-zip-compressed
    gif: image/gif
    ...用 regedit 搜索各种文件名后缀,应有尽有
      

  5.   

    难道每次下载文件的时候都要事先判断contentType。
    我记得我以前用上面的代码成功过,不知道现在怎么老是不成功。我觉得和contentType没有关系
      

  6.   

    要来下载什么啊?
    不要设置ContentType
      

  7.   

    <?
    header("content-type: application/file"); 
    header("content-disposition: attachment; filename=$filename");
    readfile("down/xxx.xxx");
    ?>
    改成
    <?
    header("content-type: application/file");
    echo "\n\n"; 
    readfile("down/xxx.xxx");
    ?>
    试试