felayman------php_自定义函数过滤指定字符
alert('您使用了禁用词语'); window.location.href='filter_string.php5'; "; }else{ echo $str; } } function filter_words($str){ //假设我无法在留言板中输入中国 $words = "中国"; if(preg_match("/$words/",$str)){ echo ""; }else{ echo "$str"; } } if(!empty($_POST['sub'])){ // filter_str($_POST['content']); filter_words($_POST['content']); }?> 自定义函数过滤器










