How to turn off mysql errors from being displayed to screen in CodeIgniter

前端 未结 4 1198
臣服心动
臣服心动 2021-02-04 00:33

Even though error_reporting is set to 0, database errors are still being printed to screen. Is there a setting somewhere I can change to disable database error reporting? This i

4条回答
  •  梦如初夏
    2021-02-04 01:18

    In addition to Ian's answer, to temporarily disable the error messages:

    $db_debug = $this->db->db_debug;
    $this->db->db_debug = false;
    
    // Do your sketchy stuff here
    
    $this->db->db_debug = $db_debug;
    

提交回复
热议问题