我的做法是:
直接输入该文件在服务器上存放的地址(当然这个目录是特殊的,不能暴露服务器的目录信息的,你也可以显示的时候加密,下载的时候解密目录)
echo "<a pref=http://www.xxx.xxx/你的文件>点击下载</a>";
如果要安全点的话($path是已经用base64-encode()加密过的)
$path=base64_decode($path);
echo "<a pref=http://www.xxx.xxx/$path.$file>点击下载</a>";

解决方案 »

  1.   

    header("Content-type: application/x-gzip");
    header("Content-Disposition: attachment; filename=some-file.tar.gz");
    header("Content-Description: PHP3 Generated Data");
    readfile($path.$file)
      

  2.   

    上面二位可能没有理解楼顶的意思,他指的是连接到一个文件,比方说
    file.txt/file.rm ,在单击连接的时候出现的是另存为窗口,而不是用
    浏览器或者realplay打开楼顶是这个意思把,我确实也见过这样作的,他的php源文件编译过了....
    关注!!
      

  3.   

    rei() 说的对,怎样实现的呢