duanjianlu0506 2016-07-22 16:49
浏览 85
已采纳

mysqli_real_escape_string()期望参数1为mysqli,null为null

.../general.php on line 10

Hello, this is my error, but only occurs when I upload my web to a host, in the localhost run well.

the (return mysqli_real_esc..)line is the "line 10".

$conncet = mysqli_connect('xxx','xxx','xxx','xxx');
function array_sanitize(&$datos) {
        global $connect;
        $datos = mysqli_real_escape_string($connect,$datos);
}

thanks for your time!!

</div>
  • 写回答

3条回答 默认 最新

  • duanjurong1347 2016-07-22 16:52
    关注

    i think you have typo in your variable, please check your $connect => $conncet variable

    $conncet = mysqli_connect('xxx','xxx','xxx','xxx');
    function array_sanitize(&$datos) {
            global $connect;
            $datos = mysqli_real_escape_string($connect,$datos);
    }

    </div>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 Odoo17操作下面代码的模块时出现没有'读取'来访问
  • ¥50 .net core 并发调用接口问题
  • ¥15 网上各种方法试过了,pip还是无法使用
  • ¥15 用verilog实现tanh函数和softplus函数
  • ¥15 Hadoop集群部署启动Hadoop时碰到问题
  • ¥15 求京东批量付款能替代天诚
  • ¥15 slaris 系统断电后,重新开机后一直自动重启
  • ¥15 QTableWidget重绘程序崩溃
  • ¥15 谁能帮我看看这拒稿理由啥意思啊阿啊
  • ¥15 关于vue2中methods使用call修改this指向的问题