codeIgniter use mysql_real_escape_string() instead.database connection issue

前端 未结 5 569
臣服心动
臣服心动 2021-01-06 04:52

I have code igniter installed on server with database I want to run the same db on my mac, I used MAMP and I copy the project folder inside htdocs, but I have this error wou

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-06 05:26

    Try this

    function escapeString($val) {
        $db = get_instance()->db->conn_id;
        $val = mysqli_real_escape_string($db, $val);
        return $val;
    }
    

提交回复
热议问题