model:<?php class Test_model extends CI_Model{
function __construct()
{
// Call the Model constructor
parent::__construct();
}
}
?>
controller部分:
$this->load->model("test_model");
var_dump($this->Test_model);
错误信息:
Undefined property: Login:Test_model
function __construct()
{
// Call the Model constructor
parent::__construct();
}
}
?>
controller部分:
$this->load->model("test_model");
var_dump($this->Test_model);
错误信息:
Undefined property: Login:Test_model
$this->load->model('Model_name');
$this->Model_name->function();
这是文档上面案例 多看文档吧
var_dump($this->test_model);
注:红色部分和model方法参数一致