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.
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