0
我正在閱讀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($圖像)function.file-GET-內容]: 未能打開流:
第36行D:\ wamp \ www \ test_om \ rss \ rssfeed.php中沒有這樣的文件或目錄
如何儲存此圖像?
感謝,很多of..its再次把我的5 hours..thankü – omnath