Welcome Guest, Not a member yet? Register   Sign In
Newbie: Fatal error: Using $this when not in object context - URI Helper.
#5

[eluser]cahva[/eluser]
If you want to use CI resources inside a function, just use the reference as GSV Sleeper Service mentioned.

Code:
function foo()
{
    $CI =& get_instance();
    
    // Now you can use $CI->uri->segment() if you like
    if($CI->uri->segment(3)== ...)


Messages In This Thread
Newbie: Fatal error: Using $this when not in object context - URI Helper. - by El Forum - 09-08-2009, 10:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB