默默如何使用PHP来下载文件的电脑吗? [英] How to download file in computer silently using PHP?

查看:131
本文介绍了默默如何使用PHP来下载文件的电脑吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要默默或无提示使用PHP下载到计算机上的文件吗?当或点击下载链接,我可以强制定义的位置下载?像 C:/dir/dir/myfile.zip ?请注意,我问这对我的内部使用,而无一害的用户。

I want to download the files silently or without prompt to the computer using PHP? OR when click on the download link, can I force to download in defining location? Like C: /dir/dir/myfile.zip? Note that I am asking this for my internal use only, nothing to harm the users.

推荐答案

您不能。

这根本是不可能的,因为安全性问题。

It simply isn't possible, due to security issues.

现在,如果这是你自己的私人网络上的系统和驱动器是共享的,哪些不是,你可以写code从服务器写出来的文件。但是,这是用户的浏览器的所有外。其它方法包括在用户的计算机上运行的外部应用程序。当他们点击链接,要下载的文件被添加到数据库中的一个队列。客户端应用程序获取这些数据,并会下载它。 AudioGalaxy曾经使用这种方法。

Now, if these are systems on your own private network, and drives are shared and what not, you could write code to write out the files from the server. But, that is all outside of the user's browser. Other methods have included external applications running on the user's computer. When they click a link, the file to be downloaded is added to a queue in a database. The client application gets this data and will download it. AudioGalaxy used to use this method.

这篇关于默默如何使用PHP来下载文件的电脑吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆