一键下载并保存(使用php) [英] download and save in one click (using php)

查看:102
本文介绍了一键下载并保存(使用php)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从php页面下载文件,然后将其保存到文件夹中,然后检索保存的文件,然后将其发送给数据库内的所有用户.

How to download a file from a php page then save it into a folder, after that retrieve the saved file then send it to all user inside the database.

推荐答案

从客户端的角度(下载始终由扮演客户端角色的软件完成),没有诸如"PHP页面"之类的东西.对于客户端,所有页面都是相同的. HTTP是HTTP.

如果您想使用PHP下载任何内容,请参见: http://php.net/manual/zh/function. fopen.php [ ^ ].此页面上有一个下载示例,请找到它.基本上,您只是打开一个流并通过其URL绑定任何资源,这取决于您使用的URL方案.这对于下载代码是透明的.

—SA
From the standpoint of the client (download is always done by software playing the role of the client), there is no such thing as "PHP page". For a client, all pages are the same. HTTP is HTTP.

If you want do download anything with PHP, look here: http://php.net/manual/en/function.fopen.php[^]. There is a download sample on this page, please find it. Basically you simply open a stream and binds with any resource by its URL, depending on the URL scheme you use. This is transparent to the downloading code.

—SA


这篇关于一键下载并保存(使用php)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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