php 表单验证过滤类
class post_get{
private $array; #提交表单检测字段和检测要求
# $type; 缺省为更新 或$type ="Into";
public function _post_get($array,$type=""){
if(!$array) die(" Error!! ");
foreach ($array as $v)
{
$KK = $this->ck_split($v);
$KKarray = split("_", $KK);
if(preg_match("/Yes|No/is",$KKarray[1]))
{
$escape_filter = ($KKarray[2])? 'ck_'.$KKarray[2]:"";#需要转义和过滤
$data = ($escape_filter)? $this->$escape_filter($_POST[$KKarray[0]]):$_POST[$KKarray[0]]; #输出合法<span class="t_tag" onclick="tagshow(event)" href="tag.php?name=
您可能感兴趣的文章:
php 表单验证过滤类
PHP 过滤器Filter用法详解
php判断是否为数字或字符类型的方法
php filter安全字符过滤
js 过滤特殊字符的简单例子
一个php表单字段格式验证类
php正则过滤html特殊字符
js正则表达式特殊字符过滤代码
js过滤json特殊字符
php中filter函数用法之验证邮箱、url和ip地址的方法