PHP 强制下载文件代码

网络编程 发布日期:2024/10/25 浏览次数:1

正在浏览:PHP 强制下载文件代码
复制代码 代码如下:
<?php
$filename = '1.png';
header("Content-Type: application/force-download");
header('Content-Disposition: attachment; filename="'.$filename.'"');
echo $filename;
?>