We have provided three functions not to filter some special characters, mainly using PHP to filter out the SQL sensitive string, well, let's look at the code below. Have a friend in need to take a look.
We have provided three functions not to filter some special characters, mainly using the PHP tutorial to filter out the SQL sensitive string, well, let's look at the code below. Have a friend in need to 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;
}
http://www.bkjia.com/PHPjc/629732.html www.bkjia.com true http://www.bkjia.com/PHPjc/629732.html techarticle we have provided three functions not to filter some special characters, mainly using PHP to filter out the SQL sensitive string, well, let's look at the code below. A friend who needs to take it ...