|
我下载了最新的2.1.4版本,然后自己单独建立了一个library,放在application/library下,然后发现加载报错,Unable to load the requested class:XXX
查看Loader源码,发现其load->library调用的是_ci_load_class加载的,然后下面
foreach (array(ucfirst($class), strtolower($class)) as $class)
{
$subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.'.php';
// Is this a class extension request?
if (file_exists($subclass))
{
$baseclass = BASEPATH.'libraries/'.ucfirst($class).'.php';
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下去找,这个地方是必须要扩展自他才行?
|
|