<?php
$filename = "/somepath/".$_GET['file'].".txt"; //要下载的文件名
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=".basename($filename));
readfile($filename);
?>php强制下载文件
最新推荐文章于 2026-01-06 14:02:14 发布
273

被折叠的 条评论
为什么被折叠?



