Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在不安装任何新东西或使用 FTP 将图像从一台服务器移动到另一台服务器的情况下,最好的方法是什么?你将如何做到这一点?
您可以使用 phpCURL将文件上传到网络服务器并将其移动到不同的服务器吗?你可以分配一个文件$_FILES吗?
CURL
$_FILES
一个简单的方法是使用file_get_contents
file_get_contents
这是一个例子
$path = 'image.jpg'; $file = file_get_contents("http://yoursite.com/imagepath.jpg"); file_put_contents($path,$file);