Copy code The code is as follows:
$path=$_GET["path"];
$cacheimgname=str_replace("/","_",$path);
$localimg="upimg/".$cacheimgname;
if ((file_exists($localimg))) >$httpurl=$localimg;
}
else
{
$httpurl="http://www.imageserver.com/".$path;
@copy($httpurl, $localimg);//Cache images!
} >Copy code
The code is as follows:
http://www.bkjia.com/PHPjc/318905.htmlwww.bkjia.com
true
http: //www.bkjia.com/PHPjc/318905.html
TechArticle
Copy the code as follows: ?php $path=$_GET["path"]; $cacheimgname=str_replace(" /","_",$path); $localimg="upimg/".$cacheimgname; if((file_exists($localimg))) { $httpurl=$localimg;...