Welcome Guest, Not a member yet? Register   Sign In
Can not get uri->segment to load in constructor
#1

[eluser]RJ[/eluser]
Hello,

For whatever reason I can't use the uri->segment in this controller. Loading CI instance, where URI is included in auto load.
Code:
$autoload['libraries'] = array('database', 'session', 'uri','assetlibpro');

Code:
function Dealer()
    {
        // submit log entry
        log_message('debug', "Dealer Class Initialized");        // debug log
        
        $CI =& get_instance();                                    // load ci instance
        ini_set('display_errors', 1);                            // on screen php error display

        $dealer = $this->uri->segment(3, 999);                    // set dealer from uri
        $vars = $this->grab_vars($dealer);                        // grab dealer info from db
        $this->session->set_userdata($vars);                    // add dealer info to session
        
        // submit log entry
        log_message('debug', "Dealer routines successfully run");
    }
#2

[eluser]RJ[/eluser]
Can't delete, i figured it out.




Theme © iAndrew 2016 - Forum software by © MyBB