当前位置: 首页 > 2007年12月3日发布的所有文章
  • PHP中的extract是什么作用

    PHP代码 addslashes — 使用反斜线引用字符串        extract(addslashes($_POST)); –处理POST表单     把客户端表单中的变量名取出来。        extract(addslashes($_GET)); –处理GET表单     把客户端表单中的变量名取出来。   ...

    键盘游走者 发布于 2007-12-03 18:30php抢沙发
  • PHP中用header:图片地址 简单隐藏图片源地址

    PHP代码
    1. $path=$_GET[“path”];      
    2. $cacheimgname=str_replace(“/”,“_”,$path);      
    3. $localimg=“upimg/”.$cacheimgname;      
    4. if ((file_exists($localimg)))      
    5. {      
    6. $httpurl=$localimg;      
    7. }      
    8. else     
    9. {      
    10. $httpurl=“http://www.imageserver.com/”.$path;      
    11. @copy($httpurl,$localimg);//缓存图片!      
    12. }      
    13. header(“Locationhttpurl”);      
    14. exit;      
    15. ?>    

    调用它类似这样:

     

     

    PHP代码
    1. “img.php?path=x/x/xtest.gif”>    
    ]]>

    键盘游走者 发布于 2007-12-03 18:08php抢沙发