Using PHP to filter the principle of malicious characters is very simple we just define the characters and then use the foreach traversal of the malicious word repertoires, using Strpost to detect whether the user submitted data in the malicious word repertoires characters can be instantiated. Example 1, determine if a character exists code as follows copy Code function Is_bad_chars ($str) {$bad _chars = array ("\", "'" ' "'", ' "', '/', ' * ', ', ', ')," R "," T "," N ", ' $ ', ' (', ') ', '% ', ' + ', '? ', '; ', ' ^ ', ' # ', ': ', ' ', ' ', ' = ', ' | ', '-'); foreach ($bad _chars as $value) {if (Strpos ($str, $value)!== false) {return TR
1. PHP to determine if there is a malicious character instance _php tutorial
Summary: PHP Determines if there are instances of malicious characters. The use of PHP to filter the principle of malicious characters is very simple we just define the characters and then use the foreach traversal of the malicious word repertoires, using Strpost to detect whether the user submitted data is not malicious word Fuku
2. PHP Filter all malicious characters (batch filter post,get sensitive data) _php tutorial
Summary: PHP filters all malicious characters (batch filtering post,get sensitive data). Function code: Copy code code as follows://php bulk filter Post,get sensitive data if (GET_MAGIC_QUOTES_GPC ()) {$_get = Stripslashes_array ($_get); $_post = Stripsla Shes_array ($_pos
3. PHP filters all malicious characters (batch filter post,get sensitive data)
Summary: PHP filters all malicious characters (batch filtering post,get sensitive data). Function code: Copy code code as follows://php bulk filter Post,get sensitive data if (GET_MAGIC_QUOTES_GPC ()) {$_get = Stripslashes_array ($_get); $_post = Stripsla Shes_array ($_pos
4. PHP Filter Malicious characters
Introduction: PHP Filters for malicious characters
5. PHP to determine if there are instances of malicious characters
Introduction: Using PHP to filter the principle of malicious characters is very simple we just define the characters and then use the foreach traversal of the malicious word repertoires, using Strpost to detect whether the user submitted data in the malicious word repertoires characters can be instantiated. Example 1, determine if the character exists, the code is as follows ...
6. PHP Filter all malicious characters (batch filtering post,get sensitive data) _php tips
Introduction: Recently Dedecms reported loopholes constantly, here to share the filter function of PHP, Daniel floated over it, to the small black to learn to communicate with
"Related question and answer recommendation":
How PHP filters Rlo characters to prevent text flipping