Unable to locate the specified class: setting.php
请问这个是什么原因啊?之前2.X版本没问题,现在用3.X版本就出现这个样子了3.x 版本需要文件名大写开头。 Hex 发表于 2017-8-21 11:52
3.x 版本需要文件名大写开头。
大写啦,还是这个问题,好奇怪哦
Unable to locate the specified class: Settings.php ranshaodemantou 发表于 2017-8-21 14:30
大写啦,还是这个问题,好奇怪哦
Unable to locate the specified class: Settings.php
贴代码看看吧,还有你的目录结构,写对了是肯定可以的。 SYS 这个不说了
APP 里面的
|
------core
|
------------Lin_Controller.php
------libraries
|
------------lin
|
---------Settings.php
其中Lin_Controller.php 部分内容:
class Lin_Controller extends CI_Controller {
public $setting;
public $S;
//初始化扩展控制类
function __construct(){
parent::__construct();
//载入配置
$this->load->library('lin/Settings');
//判断当前语言
$this->S['lang'] =$this->config->item('language');
$this->S['post_lang'] = $this->config->item('post_lang');
}
}
等等。。。
lin里Settings.php的内容
class Settings
{
内容内容。。。
} ranshaodemantou 发表于 2017-8-21 16:14
SYS 这个不说了
APP 里面的
|
这样试过吗 $this->load->library('lin/settings'); Hex 发表于 2017-8-21 17:16
这样试过吗 $this->load->library('lin/settings');
试过啦,不行,好迷茫啊 ranshaodemantou 发表于 2017-8-21 17:51
试过啦,不行,好迷茫啊
你的代码看起来没问题,试试不放到子目录里行不行。 Hex 发表于 2017-8-21 19:27
你的代码看起来没问题,试试不放到子目录里行不行。
$config['enable_hooks'] = FALSE;不启用就可以了 ,在2.X版本一切正常... ranshaodemantou 发表于 2017-8-21 22:12
$config['enable_hooks'] = FALSE;不启用就可以了 ,在2.X版本一切正常...
有一些人报告过这个 hook 的问题,我有时间测试下吧。
页:
[1]