我正在阅读一个 rss 提要并获得一个图像 url,现在我想将此图像存储在我的文件夹中。为此,我正在使用
$image=$movies->channel->item[i]->medium_image_url;
当我
echo $image
然后我把我$url
$url = '$image';
$img = 'images/'.time().'.'.'jpg';
file_put_contents($img, file_get_contents($url));
和我
echo $url its show only $image;
我发现了一个错误
警告:file_get_contents($image) [function.file-get-contents]:无法打开流:
第 36 行的 D:\wamp\www\test_om\rss\rssfeed.php 中没有这样的文件或目录
如何存储此图像?