Welcome Guest, Not a member yet? Register   Sign In
Problem with constructor in library
#4

[eluser]dmorin[/eluser]
You only need to load the session library once, whether you do it in the controller or library doesn't matter. Instead of doing this in your constructor:

Code:
$CI =& get_instance();

do this

Code:
$this->CI =& get_instance();

That way, you can access anything like you normally would using $this->CI->session instead of $this->session.


Messages In This Thread
Problem with constructor in library - by El Forum - 11-16-2008, 09:20 AM
Problem with constructor in library - by El Forum - 11-16-2008, 09:30 AM
Problem with constructor in library - by El Forum - 11-16-2008, 09:44 AM
Problem with constructor in library - by El Forum - 11-16-2008, 03:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB