自定义函数过滤字符串
程序员文章站
2022-06-08 11:10:56
...
4,5行不懂求解释 无 ?phpfunction str($str){$array = array("1","2","3","4","5","6");$repstr = implode($array);if(preg_match("/$str/",$repstr)){echo "scriptalert('您使用了禁用词语,请重新填写');location.href='16.php'/script";}else{echo "内容为
4,5行 不懂 求解释
alert('您使用了禁用词语,请重新填写');location.href='16.php'"; }else{ echo "内容为:".$str; } } if(!empty($_POST['sub'])){ str($_POST['te']); } ?>过滤字符串