使用 php 从其他站点下载文件到 Web 服务器
是否可以将大于 200 mb 的文件直接下载到我的虚拟主机上,这样我就不必将该文件下载到我的计算机上,然后使用我的 ftp 客户端上传。 由于我没有使用 ssh,所以我无法使用 wget。我在想 php 或 per 或 cgi 可能是.. (对所有想法开放......)
+==============+ +--------+
| Big server | -----------+ +--->|web host|
+==============+ | +------+ | +--------+
+-->| MyPC |-----+ |
+------+ | +========+
+---->| client |
+========+
或
+============+
| Big Server | ---+
+============+ | +----------+
+--------------------->| Web Host |
+----------+
|
+------+ | +========+
| MyPC | +----->| client |
+------+ +========+
请帮助......
is it possible to download file larger than 200 mb onto my web hosting directly so that i dont have to download that file to my computer and then upload using my ftp client.
and as i am not using ssh i cannot use wget. i was thinking of php or per or cgi may be..
(open to all ideas..)
+==============+ +--------+
| Big server | -----------+ +--->|web host|
+==============+ | +------+ | +--------+
+-->| MyPC |-----+ |
+------+ | +========+
+---->| client |
+========+
or
+============+
| Big Server | ---+
+============+ | +----------+
+--------------------->| Web Host |
+----------+
|
+------+ | +========+
| MyPC | +----->| client |
+------+ +========+
plz help....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于卷曲
For cURL
在 php 中最简单的可能是:
但是您应该能够执行 wget。特别是如果您的服务器上停用了外部 fopen,则很可能
使用 php,如下所示:
或
curl 是另一种方式。您可以执行shell命令或使用curl php。
还要确保您要下载到的文件夹(或文件)是可写的
in php the easiest is probably:
however you should be able to execute wget. especially if external fopen is deactivated on your server which is very likely
using php just like:
or
curl is another way. you can execute the shell command or use curl php.
also make sure the folder (or file) you want to download to is writeable
使用 PHP,您可以使用以下方法下载文件:
这需要两件事:
With PHP you can download the file with this:
This requires two things: