Welcome Guest, Not a member yet? Register   Sign In
Only Load Model in construct ??? Why
#2

[eluser]n0xie[/eluser]
Can you show me your code? I just tried it and it works fine:

Code:
/* controllers/test.php */
class Test extends Controller {
    function Test() {
        parent::Controller();

    }

    function index(){
        $this->load->model('User_model');
        $this->User_model->a();
    }

Code:
/* models/user_model.php */
class User_model extends Model{

    function User_model(){
        parent::Model();
    }

    function a(){
        echo 'a';
    }
}


Messages In This Thread
Only Load Model in construct ??? Why - by El Forum - 04-07-2009, 06:36 AM
Only Load Model in construct ??? Why - by El Forum - 04-07-2009, 06:51 AM
Only Load Model in construct ??? Why - by El Forum - 04-07-2009, 07:00 AM
Only Load Model in construct ??? Why - by El Forum - 04-07-2009, 07:10 AM
Only Load Model in construct ??? Why - by El Forum - 04-07-2009, 07:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB