我有xampp Web服务器,并尝试使用标题下载文件!不知道出了什么问题,但是文件没有开始下载并且没有出现在浏览器中!在http响应中,我有文件的来源!
header("Content-disposition: attachment;filename=d:\\archive\\result.csv");
header("Content-type: application/pdf");
readfile("sample.pdf");
任何人都可以阻止我!
答案 0 :(得分:-1)
尝试一下
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=file:///D:\archive\result.csv' );