易截截图软件、单文件、免安装、纯绿色、仅160KB

php常用的正则过滤


$str=preg_replace("/\s+/", " ", $str); //过滤多余回车   
$str=preg_replace("/<[ ]+/si","<",$str); //过滤<__("<"号后面带空格)   
  
$str=preg_replace("/<\!--.*?-->/si","",$str); //注释   
$str=preg_replace("/<(\!.*?)>/si","",$str); //过滤DOCTYPE   
$str=preg_replace("/<(\/?html.*?)>/si","",$str); //过滤html标签   
$str=preg_replace("/<(\/?head.*?)>/si","",$str); //过滤head标签   
$str=preg_replace("/<(\/?meta.*?)>/si","",$str); //过滤meta标签   
$str=preg_replace("/<(\/?body.*?)>/si","",$str); //过滤body标签   
$str=preg_replace("/<(\/?link.*?)>/si","",$str); //过滤link标签   
$str=preg_replace("/<(\/?form.*?)>/si","",$str); //过滤form标签   
$str=preg_replace("/cookie/si","COOKIE",$str); //过滤COOKIE标签   
  
$str=preg_replace("/<(applet.*?)>(.*?)<(\/applet.*?)>/si","",$str); //过滤applet标签   
$str=preg_replace("/<(\/?applet.*?)>/si","",$str); //过滤applet标签   
  
$str=preg_replace("/<(style.*?)>(.*?)<(\/style.*?)>/si","",$str); //过滤style标签   
$str=preg_replace("/<(\/?style.*?)>/si","",$str); //过滤style标签   
  
$str=preg_replace("/<(title.*?)>(.*?)<(\/title.*?)>/si","",$str); //过滤title标签   
$str=preg_replace("/<(\/?title.*?)>/si","",$str); //过滤title标签   
  
$str=preg_replace("/<(object.*?)>(.*?)<(\/object.*?)>/si","",$str); //过滤object标签   
$str=preg_replace("/<(\/?objec.*?)>/si","",$str); //过滤object标签   
  
$str=preg_replace("/<(noframes.*?)>(.*?)<(\/noframes.*?)>/si","",$str); //过滤noframes标签   
$str=preg_replace("/<(\/?noframes.*?)>/si","",$str); //过滤noframes标签   


相关文档:

PHP中多维数组的排序

1.用户定义排序:usort($array, functionName);其中functionName为用户定义的函数名,用户定义的函数指定排序规则,比较数组中两个元素的大小,大于返回正数,小于返回负数,等于返回0。2.反向用户排序:用户定义函数时,比较数组中两个元素的大小,大于返回负数,小于返回正数,等于返回0。$fruits = array(array('APP', ' ......

php 函数

htmlspecialchars()    
函数把一些预定义的字符转换为 HTML 实体。
      ENT_COMPAT - 默认。仅编码双引号。
          eg:" (双引号) 成为 &quot;
implode()    
函数把
数组元素组合为一个字 ......

编译php支持curl和pdo_mysql

安装curl
  
  
  1. curl 是 php 標準庫,所以可以在原來的 phpX.X.X.tar.gz 中找到。
  2. 進入 php 目錄中的 ext 找到 curl
  3. 在 curl 目錄中執行 /usr/local/php5-fastcgi/bin/phpize
  4. 再來將他生成的檔案進行 ./con ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号