php下载文件,添加响应头

mac2022-06-30  21

//下载,添加响应头信息 header('Content-type:application/octet-stream'); header('Content-Disposition:attachment;filename="'.basename($file).'"'); header('Content-Length:'.filesize($file)); readfile($file);

转载于:https://www.cnblogs.com/D-Chen/p/5859573.html

最新回复(0)