PHP 强制下载文件代码,任意文件下载代码,可以让任何文件都是提示下载的实现代码。
复制代码 代码如下:
$filename = '1.png';
header("Content-Type: application/force-download");
header('Content-Disposition: attachment; filename="'.$filename.'"');
echo $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