新手遇到问题
Fatal error: Call to undefined method Welcome::_remove_invisible_characters() in D:\apmxe\htdocs\pingogo\zzh\database\drivers\odbc\odbc_driver.php on line 249出现以上错误是什么原因引起的呢?
我用的是access数据库,查询测试通过,在插入时,就出现以上问题了. 跟你说的情况,是 CI 对于 Access 支持的不够好,只能修改 CI 的数据库驱动代码了,我从来没用过 Access... 把插入代码发一下 3# visvoy
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
}
function index()
{
$data["query"] = $this->db->get("user");
$this->load->view('welcome_message',$data);
}
function welcome_insert()
{
$this->db->insert("user",$_POST);
redirect("welcome/index");
} 2# Hex
在odbc_driver文件中function escape_str($str)
{
// Access the CI object
$CI =& get_instance();
// ODBC doesn't require escaping
return $CI->_remove_invisible_characters($str); //这个方法调不到,
} CI版本多少,还有PHP版本呢?
楼主试试在index()里面var_dump($CI =& get_instance());是否为object
页:
[1]