如下所示:
PHP;">
//下载,添加响应头信息
header('Content-type:application/octet-stream');
header('Content-Disposition:attachment;filename="'.basename($file).'"');
header('Content-Length:'.filesize($file));
readfile($file);
原文链接:https://www.f2er.com/php/18993.html