Home > php教程 > php手册 > 安全下载与断点续传

安全下载与断点续传

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-21 09:05:53
Original
1277 people have browsed it

安全|下载

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

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");



Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
About header files
From 1970-01-01 08:00:00
0
0
0
objective-c - header search path
From 1970-01-01 08:00:00
0
0
0
header problem
From 1970-01-01 08:00:00
0
0
0
How to control the length of page-header?
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template