以下是问题所在:
我得到一个从图像覆盖web服务的流。
该字符串如下所示:
$string = http://[ipaddress]/faceCrop/Z%3A%5Ccelebhair%5CHair2-148_172_278_378.png/Z%3A%5Cprofilepictures%5C9ef14819f0.png/90/40/300/466
然后,我将图像呈现如下:
<img src="<?php echo $string;?>">
这将正确显示图像。
但是,我需要将图像(自动)保存到服务器上的一个文件夹中。
如何使用PHP或Javascript将数据存储为物理映像?
谢谢
J
发布于 2014-06-16 04:00:43
您必须获取文件的内容,然后保存内容。
$fileContent = file_get_contents($url);
file_put_contents($filePath, $fileContent);
https://stackoverflow.com/questions/24243197
复制相似问题