$value) { $_POST[$key] = mysqli_real_escape_string($conn,str_replace("","",..."/> $value) { $_POST[$key] = mysqli_real_escape_string($conn,str_replace("","",...">
Maison > Article > développement back-end > 各位看看代码哪里错误了
$coon=mysqli_connct($host,$useranme,$password,$db);
mysqli_query($conn,"set names utf8");
foreach ($_POST as $key => $value) {
$_POST[$key] = mysqli_real_escape_string($conn,str_replace("\","\",$value));
}
foreach ($_GET as $key => $value) {
$_GET[$key] = mysqli_real_escape_string($conn,htmlspecialchars ($value,ENT_QUOTES,'UTF-8'));
}
$coon=mysqli_connct($host,$useranme,$password,$db);
mysqli_query($conn,"set names utf8");
foreach ($_POST as $key => $value) {
$_POST[$key] = mysqli_real_escape_string($conn,str_replace("\","\",$value));
}
foreach ($_GET as $key => $value) {
$_GET[$key] = mysqli_real_escape_string($conn,htmlspecialchars ($value,ENT_QUOTES,'UTF-8'));
}
这个地方的斜线会转义后面的双引号的吧