我有这样的代码
          [... page content]
          header("Content-type: application/x-download");
          header("Content-Length: ".$filesize);
          header("Content-Disposition: attachment; filename=".urlLastSeg($buttons['Torrent file(Torcache)']));
          header("Content-Transfer-Encoding: binary");
          echo $filecontent ; 
然后浏览器提示保存文件,但该文件包含页面的 html,并在末尾附加了二进制数据,而不是单独的二进制数据。