Php anti-SQL injection filtering code. We provide three letters to filter out some special characters, mainly using php to filter out SQL sensitive strings. let's take a look at this code. If you have any need, we have provided three letters to filter out some special characters. we mainly used php to filter out SQL sensitive strings. let's take a look at this code. If you need it, take a look.
We provide three letters to filter out some special characters, mainly by using the php Tutorial to filter out SQL sensitive strings. let's take a look at this code. If you need it, take a look.
Function phps tutorial ql_show ($ str ){
$ Str = stripslashes ($ str );
$ Str = str_replace ("\", "", $ str );
$ Str = str_replace ("/", "/", $ str );
$ Str = str_replace ("", "", $ str );
$ Str = str_replace (",", $ str );
Return $ str;
}
Function phpsql_post ($ str ){
$ Str = stripslashes ($ str );
$ Str = str_replace ("|", "|", $ str );
$ Str = str_replace ("<", "<", $ str );
$ Str = str_replace (">", ">", $ str );
$ Str = str_replace ("", "", $ str );
$ Str = str_replace ("", "", $ str );
$ Str = str_replace ("(", "(", $ str );
$ Str = str_replace (")", ")", $ str );
$ Str = str_replace ("" ', "'", $ str );
// $ Str = str_replace ("'", "'", $ str );
$ Str = str_replace ('"'," ", $ str );
$ Str = str_replace (",", $ str );
$ Str = str_replace ("$", "$", $ str );
$ Str = str_replace ("", "\", $ str );
$ Str = str_replace ("/", "/", $ str );
Return $ str;
}
Function phpsql_replace ($ str ){
$ Str = stripslashes ($ str );
$ Str = str_replace ("'", "'", $ str );
Return $ str;
}
Bytes. A friend in need can take it...