Home >Backend Development >PHP Tutorial > 各位能帮忙解释一上,上面的代码,有些小弟我在帮助里找的到,有的找不到

各位能帮忙解释一上,上面的代码,有些小弟我在帮助里找的到,有的找不到

WBOY
WBOYOriginal
2016-06-13 13:24:37730browse

各位能帮忙解释一下,下面的代码,有些我在帮助里找的到,有的找不到
header("Content-type:application/octet-stream");
header("Accept-ranges:bytes");
header("Accept-length:".filesize($path));
header("Content-Disposition:attachment;filename=".$filename);

------解决方案--------------------
这是生成下载框的头信息。
------解决方案--------------------
就是告诉浏览器要开始下载文件了。

Statement:
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