|
近日研究CI源码中,遇到个不理解的地方,望指教
CI_Loader.php第754行起
$subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.EXT;
// Is this a class extension request?
if (file_exists($subclass))
{
$baseclass = BASEPATH.'libraries/'.ucfirst($class).EXT;
if ( ! file_exists($baseclass))
{
log_message('error', "Unable to load the requested class: ".$class);
show_error("Unable to load the requested class: ".$class);
// ....
}
//....
这样它在APPPATH和BASEPATH都去找$class, 否则异常,难道我在APPPATH中自定义的类还要在BASEPATH中再写一个?
不知自己是否有想偏差了,指教~~plz~ |
|