<div class="codetitle"><a style="CURSOR: pointer" data="19456" class="copybut" id="copybut19456" onclick="doCopy('code19456')"> 代码如下:<div class="codebody" id="code19456"> <?php $path=$_GET["path"]; $cacheimgname=strreplace("/","",$path); $localimg="upimg/".$cacheimgname; if((file_exists($localimg))) { $httpurl=$localimg; } else { $httpurl="http://www.imageserver.com/".$path; @copy($httpurl,$localimg);//缓存图片! } header("Locationhttpurl"); exit; ?>
调用它类似这样: <div class="codetitle"><a style="CURSOR: pointer" data="11170" class="copybut" id="copybut11170" onclick="doCopy('code11170')"> 代码如下:<div class="codebody" id="code11170"> <imgsrc="img.php?path=x/x/xtest.gif">
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|