Welcome Guest, Not a member yet? Register   Sign In
extend core class CI_Session problem
#1

[eluser]mdr[/eluser]
Hi ppl
I'm do something wrong and I need help with my problem

I created the Session.php in application/libraries with the next code:

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Session extends CI_Session {
    
     function MY_Session()
     {
         parent::CI_Session();        
         if (!$this->getSessionLang()) {
             $CI = &get;_instance();
             $CI->config->load('site',true);
             $this->set_userdata('lang',
                 $CI->config->item('deflang','site'));
         }
     }
    
     function setSession($data = array())
     {
         $this->set_userdata($data);
     }
    
     function getSessionLang()
    {
        return $this->userdata('lang');
    }
    
    function setSessionLang($varlang = "")
    {
        $CI = &get;_instance();
        $CI->load->library('util');
        if ($CI->util->isValidLang($varlang))
            $this->set_userdata('lang',$varlang);
    }
}
?>

And error is:
Fatal error: Class 'Session' not found in /usr/local/www/geowines/system/application/libraries/Session.php on line 2

line 2 is class MY_Session extends CI_Session....

any idea?


Messages In This Thread
extend core class CI_Session problem - by El Forum - 10-22-2008, 12:55 PM
extend core class CI_Session problem - by El Forum - 10-22-2008, 01:16 PM
extend core class CI_Session problem - by El Forum - 10-22-2008, 02:04 PM
extend core class CI_Session problem - by El Forum - 10-22-2008, 02:15 PM
extend core class CI_Session problem - by El Forum - 10-22-2008, 02:56 PM
extend core class CI_Session problem - by El Forum - 11-11-2008, 05:09 AM
extend core class CI_Session problem - by El Forum - 11-11-2008, 08:56 AM
extend core class CI_Session problem - by El Forum - 12-22-2008, 03:48 PM
extend core class CI_Session problem - by El Forum - 12-27-2010, 07:47 PM
extend core class CI_Session problem - by El Forum - 02-17-2011, 11:29 AM
extend core class CI_Session problem - by El Forum - 02-17-2011, 04:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB