Home > Backend Development > PHP Tutorial > According to the picture address, save the picture to the local ins to save the picture software to save the picture word to save the picture

According to the picture address, save the picture to the local ins to save the picture software to save the picture word to save the picture

WBOY
Release: 2016-07-29 08:52:03
Original
1533 people have browsed it
function getImg($url,$filename){
if($url == '')
return false;
//Open the output control buffer
Ob_start();
                                 Read the url image file and write it to the output cache
                                                                                                                                        readfile($url); /clear output cache Area content
                                                                                                                                                                                  Ob_end_clean();
            $imgdir = './';
                            $fp                                                                                                                               }
getImg('
http://ubmcmm.baidustatic.com/media/v1/0f000ntPpKn9AHLumTK7W6.jpg','1.jpg'); The above introduces how to save pictures to the local according to the picture address, including saving pictures and picture addresses. I hope it will be helpful to friends who are interested in PHP tutorials.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template