我用header函数测试了一下,可以的挖。是不是LZ header哪里出了错?? 我Email:
 [email protected]

解决方案 »

  1.   

    楼上有qq或msn么我就是用的
    header("Location:$go2");啊
    我测试了一下还是不行啊
    测试代码如下
    <?php
    header("Location:ftp://test:test@***.***/**.rar");
    ?>说明一下,ftp://test:test@***.***/**.rar是下载地址,直接在浏览器里下载没什么问题
      

  2.   

    <?php$pName = "realname.zip"; //物理文件名$dName = "down.zip"; //下载文件名downFile($pName,$dName);function downFile($physicalName,$downloadName){
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/x-zip");
    header("Content-Disposition: attachment; filename=$downloadName" );
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: ".filesize($physicalName));
    readfile($physicalName);
    }?>
      

  3.   

    如果是在iis下使用header是有这个问题