public function download($path){ $file=htmlspecialchars_decode(file_get_contents($path)); $outfile=basename($path); header('Content-type: application/octet-stream; charset=utf8'); Header("Accept-Ranges: bytes"); header('Content-Disposition: attachment; filename='.$outfile); echo $file; }
php实现文件的下载
最新推荐文章于 2020-11-29 15:24:18 发布