1 2 3 4 5 6 7 8 9 10 11 12
| <?php $imgArr = array( 'https://cdn.jsdelivr.net/gh/honjun/ImageHosting/sina/006bYVyvgy1fhoaywi4qaj307g037q2r.jpg', 'https://cdn.jsdelivr.net/gh/honjun/ImageHosting/sina/006bYVyvgy1fhoaytokqnj308o02g3yd.jpg', 'https://cdn.jsdelivr.net/gh/honjun/ImageHosting/sina/006bYVyvgy1fhf69hzfxej30ip09lmxs.jpg', 'https://cdn.jsdelivr.net/gh/honjun/ImageHosting/sina/006bYVyvgy1fhf7a6r8ykj30jy0lcac0.jpg', ); $count = count($imgArr); foreach ($imgArr as $key => $url) { $content = file_get_contents($url); file_put_contents($key.'.jpg', $content); }
|
希望这篇文章能给你带来知识和乐趣,喜欢博主的文章可以加博主好友哦
有好的文章也可以向博主投稿哦