Welcome Guest, Not a member yet? Register   Sign In
why still checking loaded files even though include a file using 'include_once'
#1

[eluser]noname11[/eluser]
Hey all! I have a problem about class Loader that why still checking loaded files even though include a file using 'include_once'. thanks very much

// Safety: Was the class already loaded by a previous call?
if (in_array($filepath, $this->_ci_loaded_files))
{
// Before we deem this to be a duplicate request, let's see
// if a custom object name is being supplied. If so, we'll
// return a new instance of the object
if ( ! is_null($object_name))
{
$CI =& get_instance();
if ( ! isset($CI->$object_name))
{
return $this->_ci_init_class($class, '', $params, $object_name);
}
}

$is_duplicate = TRUE;
log_message('debug', $class." class already loaded. Second attempt ignored.");
return;
}

include_once($filepath);
$this->_ci_loaded_files[] = $filepath;
return $this->_ci_init_class($class, '', $params, $object_name);


Messages In This Thread
why still checking loaded files even though include a file using 'include_once' - by El Forum - 08-12-2010, 08:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB