日期:2013-04-17  浏览次数:20402 次

快速搞定文件下载头部输出

header("Content-type: application/x-download");
header("Content-Disposition: attachment; filename=$file_download_name;");
header("Accept-Ranges: bytes");
header("Content-Length: $download_size");
echo 'xxx'


用header输出ftp下载方式,并且支持断点续传
一个例子:
header('Pragma: public');
header('Cache-Control: private');
header('Cache-Control: no-cache, must-revalidate');
header('Accept-Ranges: bytes');
header('Connection: close');
header("Content-Type: audio/mpeg");

header("Location:ftp://download:123456@202.16.22.15/神话.rmvb");