dqq46733 2017-03-02 00:10
浏览 113

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

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");
  • 写回答

1条回答 默认 最新

  • douxianji6181 2017-03-02 00:15
    关注

    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.

    评论

报告相同问题?