php下载文件,添加响应头时间:2023-03-09 00:00:39 //下载,添加响应头信息 header('Content-type:application/octet-stream'); header('Content-Disposition:attachment;filename="'.basename($file).'"'); header('Content-Length:'.filesize($file)); readfile($file);