加载火花库时,Codeigniter 404页面抛出错误

时间:2022-01-14 06:57:09

I’m running into a problem tonight that i just can’t figure out. I’m loading the spark for the Carabiner Asset Library

我今晚遇到了一个我无法弄清楚的问题。我正在加载Carabiner资产库的火花

$this->load->spark('carabiner/1.5.4', array('library' => 'carabiner')); 

I’m running into an error/ no error loading the spark in these senarios:

我遇到错误/没有错误加载这些senarios中的火花:

default_controller/foo <- foo method does not exist, 404 loads fine

default_controller / foo < - foo方法不存在,404加载正常

other_controller/bar <- bar is a method in other_controller, method load fine

other_controller / bar < - bar是other_controller中的一个方法,方法加载正常

other_controller/wakawaka -> wakawaka does not exist, Message: Undefined property: Error::$carabiner

other_controller / wakawaka - > wakawaka不存在,消息:未定义属性:错误:: $ carabiner

$this->carabiner->config($carabiner_config); 

is the line php/codeigniter is complaining about

是php / codeigniter抱怨的行

Carabiner is being loaded in a MY_controller where default_controller and other_controller both extend MY_controller

Carabiner正在MY_controller中加载,其中default_controller和other_controller都扩展了MY_controller

I commented out the config line above and got the same error on the next spark i had to load and call, Template.

我注释掉了上面的配置行,并在下一个必须加载和调用的火花上得到了相同的错误,模板。

Any idea what’s going on?

知道发生了什么事吗?

1 个解决方案

#1


0  

If you load the carabiner in MY_Controller constructor make sure you call the parent constructor in controllers that extend it.

如果在MY_Controller构造函数中加载carabiner,请确保在扩展它的控制器中调用父构造函数。

#1


0  

If you load the carabiner in MY_Controller constructor make sure you call the parent constructor in controllers that extend it.

如果在MY_Controller构造函数中加载carabiner,请确保在扩展它的控制器中调用父构造函数。