簡體   English   中英

如何將文件下載到php中的指定目錄?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM