首页 > 开发 > PHP > 正文

安全下载与断点续传

2024-05-04 22:59:47
字体:
来源:转载
供稿:网友
快速搞定文件下载头部输出

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:[email protected]/神话.rmvb");
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表