Return to Snippet

Revision: 34518
at October 23, 2010 16:57 by sybrex


Initial Code
function __autoload($class)
{
    if (strpos($class, 'CI_') !== 0)
    {
        if (is_file($location = APPPATH.'libraries/'.$class.EXT))
        {
            include_once $location;
        }    
        else if (is_file($location = APPPATH.'core/'.$class.EXT))
        {
            include_once $location;
        }
    }
}

Initial URL


Initial Description


Initial Title
Codeigniter autoload

Initial Tags
codeigniter

Initial Language
PHP