当前位置: 移动技术网 > IT编程>开发语言>PHP > PHP中用header图片地址 简单隐藏图片源地址

PHP中用header图片地址 简单隐藏图片源地址

2019年05月12日  | 移动技术网IT编程  | 我要评论

郝志中,三国志4中文版下载,实习证明格式

复制代码 代码如下:

<?php       
$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);//缓存图片!       
}       
header("locationhttpurl");       
exit;       
?>   

调用它类似这样:
复制代码 代码如下:

<img src="img.php?path=x/x/xtest.gif">  

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网