字Php The method and code example of the special character's security filtering & function checkhacks ($ Checkinfo, $ action) {// action 0 directly exit and prompts, replace the dangerous Chinese -
;$i (IF (STRPOS ($ Checkinfo, $ Badwords [$ i])! = False) { IF ($ Action == "0") { Echo "system detects prohibited Special characters: ". $ Badwords [$ i]; exit; Break;}} elseif ($ action ==" 1 ") { $ Checkinfo = Str_replace ($ badwords [$ i]," "" "" "" "" "" "" "" "" "" "" "" ,$checkinfo); /*********************Call functions************************** **** ********************************************* >
- Copy code
-
-
function, action, false, count, detection
-
-
-
-
|