[英]PHP: How to save mysql to excel file to a directory and not prompt user to download
[英]how to download a file into a specified directory in php?
如何將csv文件下載到指定目錄? 現在我使用了這段代碼,
header("Location:uploads/".$dire);
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=".$nn);
header("Pragma: no-cache");
header("Expires: 0");
在這里, $dire
是上載文件夾的子目錄, $nn
是csv文件名。 我要下載此$nn
文件並保存在指定目錄$dire
。 但是它顯示了一個錯誤
提前致謝。
您無法控制客戶端(網絡瀏覽器)的行為。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.