php下载远端文件到空间解决方法

WBOY
Release: 2016-06-13 10:18:29
Original
867 people have browsed it

php下载远端文件到空间
上传文件好辛苦,我想用php写个文件放在空间,直接下载已经上传到服务器另一个空间的文件,可以省去上传的时间,我再手动上传已经更改的文件即完成整个网站的上传。有办法吗?

------解决方案--------------------
file_get_contents
file_put_contents
用这两个函数可以做到。

$file = file_get_contents(地址和文件名)
file_put_contents(保存地址和文件名,$file)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template