如下所示:
//下载,添加响应头信息 header("Content-type:application/octet-stream"); header("Content-Disposition:attachment;filename="".basename($file)."""); header("Content-Length:".filesize($file)); readfile($file);
以上就是小编为大家带来的php下载文件,添加响应头的简单实例的全部内容了,希望对大家有所帮助,多多支持网页设计~