首页 > 解决方案 > 无法访问受保护的属性 CI_DB_mysqli_driver::$_protect_identifiers

问题描述

我得到无法访问受保护的属性 CI_DB_mysqli_driver::$_protect_identifiers 代码如下

function xyz($use_protech_identifier = false)
{
 $this->db->_protect_identifiers=$use_protech_identifier;
}

标签: codeigniter

解决方案


检查这个。由于最新的 CI 版本,这可能会起作用。 从protect_identifiers 中删除_。

$this->db->protect_identifiers=$use_protech_identifier;

另请参阅我在https://stackoverflow.com/a/50738006/3449206中给出的相同答案


推荐阅读