简体   繁体   English

如何在php,jquery中设置任何浏览器的默认下载目录

[英]How to set default download directory of any browser in php, jquery

在PHP技术,我试图更改任何浏览器的默认下载目录。

This is not possible. 这是不可能的。 The default download direction/location of a browser is configurable from the client side by the user. 用户可以从客户端配置浏览器的默认下载方向/位置。 PHP scripts resides and executes on the server side. PHP脚本驻留在服务器端并在服务器端执行。

For Mozilla: 对于Mozilla:

https://support.mozilla.org/en-US/questions/959747 https://support.mozilla.org/en-US/questions/959747

For Google Chrome: 对于谷歌浏览器:

https://support.google.com/chrome/answer/95574?hl=en https://support.google.com/chrome/answer/95574?hl=en

For Internet Explorer 对于Internet Explorer

http://www.sevenforums.com/tutorials/112232-internet-explorer-change-default-download-location.html http://www.sevenforums.com/tutorials/112232-internet-explorer-change-default-download-location.html

For Safari: 对于Safari:

http://www.dummies.com/how-to/content/how-to-change-safaris-default-file-download-locati.html http://www.dummies.com/how-to/content/how-to-change-safaris-default-file-download-locati.html

This is explained in RFC 2182 section 2.3 . RFC 2182第2.3节对此进行了解释。 It is impossible because of security. 由于安全,这是不可能的。

The receiving MUA SHOULD NOT respect any directory path information that may seem to be present in the filename parameter. 接收MUA不应该尊重文件名参数中可能出现的任何目录路径信息。

You can only change suggested name of file that is being downloaded. 您只能更改正在下载的文件的建议名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM