• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trouble calling function in model

#4
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.