Welcome Guest, Not a member yet? Register   Sign In
trouble calling function in model
#4

(This post was last modified: 01-14-2021, 07:17 AM by iRedds.)

When you call $this->load->model() or $this->load->library() then the created instance of the class is stored in the global context.
The controller and model have direct access to this store.

Your module most likely does not have the functionality to access the global context

try to do it in your module

PHP Code:
$CI = & get_isntance();
$CI->load->model('MyModel')->library('session');
$this->MyModel $CI->MyModel;
$this->session $CI->session
Reply


Messages In This Thread
trouble calling function in model - by richb201 - 01-13-2021, 05:23 AM
RE: trouble calling function in model - by iRedds - 01-14-2021, 07:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB