我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何更改要保存的文件的路径?

I need to change the path of the file to be saved. Please help me.

$filename = "All Reports";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . $filename . ".xls");
header("Pragma: no-cache");
header("Expires: 0");

You cannot tell the browser which directory (path) to use in order to save the file.

If you could do that it means that you have access to the user's data and its a security risk.

近期文章

  • 如果输入不正确,尝试使div振动
  • 是否可以检测页面是否包含PHP?
  • PHP:如何在html中找到并提取具有src属性的元素(来自url)
  • BindParam用于插入多个值
  • 从foreach循环内部调用变量以放入数组内部
  • 电子邮件标题格式(PHP)
  • 限制页面路径转换?
  • 禁用输入类型问题
  • 在我的PHP代码中有语法错误[重复]
  • Codeigniter表单未提交
  • 如何在给定时间后取消将变量推入存储在会话中的数组中
  • 重写用于REST导出的Drupal映像URL
  • PHP for循环不递增
  • 重命名SonataUserBundle角色
  • 已安装V8j但无法正常工作
  • 如何使用Plesk在我的网络服务器上禁用https?
  • PayPal付款按钮,包含产品详细信息
  • 如果访客是蜘蛛,防止写日志/文件?
  • 在更多循环中创建数组多维php [编辑]
  • 无法使用php中的rowspan动态显示行和列

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华