繁体   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