当前位置:主页 > 软件编程 > PHP代码 >

PHP 强制下载文件代码

时间:2021-02-26 10:54:07 | 栏目:PHP代码 | 点击:

复制代码 代码如下:

<?php
$filename = '1.png';
header("Content-Type: application/force-download");
header('Content-Disposition: attachment; filename="'.$filename.'"');
echo $filename;
?>

您可能感兴趣的文章:

相关文章