Php get方法的mysql\u real\u escape\u字符串工作不正常
代码可以在本地主机上工作,但不能在实时服务器上工作 这是我的密码Php get方法的mysql\u real\u escape\u字符串工作不正常,php,Php,代码可以在本地主机上工作,但不能在实时服务器上工作 这是我的密码 if(isset($_GET['email'])){ $email = mysql_real_escape_string($_GET['email']); } else{ $email = ''; } if(isset($_GET['mobile'])){ $mobile = mysql_real_escape_string($_GET['mobile']); else{ $mobile = '';
if(isset($_GET['email'])){
$email = mysql_real_escape_string($_GET['email']);
}
else{
$email = '';
}
if(isset($_GET['mobile'])){
$mobile = mysql_real_escape_string($_GET['mobile']);
else{
$mobile = '';
}
echo "Email : ".$email;
echo "<br>";
echo "Mobile : ".$mobile;
if(设置($\u GET['email'])){
$email=mysql\u real\u escape\u字符串($\u GET['email']);
}
否则{
$email='';
}
如果(isset($_GET['mobile'])){
$mobile=mysql\u real\u escape\u字符串($\u GET['mobile']);
否则{
$mobile='';
}
echo“Email:”.$Email;
回声“
”;
echo“Mobile:.$Mobile;
尝试使用DB连接
否则
尝试mysqli\u real\u escape\u字符串和mysqli数据库连接
mysqli_real_escape_string
为什么要责怪该功能?您是否尝试过启用错误报告?您知道该功能的用途吗(→不是HTML输出!)是否有到sql server的连接?Mysql扩展已弃用,不再从Php 7中提供。您的Php版本是什么?Fine“not working”。它是否格式化您的服务器驱动器或其他内容?请添加更多详细信息,说明什么是输出,“not working”是什么意思。请提供一些上下文以供回答。
$email=mysqli_real_escape_string($connection,$_GET['email']);