代码点火器控制器/型号名称冲突 [英] Code Igniter Controller/Model name conflicts
本文介绍了代码点火器控制器/型号名称冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个控制器和模型都命名为帐户,而没有得到不能重新排序类。
I have a controller and model both named "account" without getting "cannot redeclare class". I'd like to add a prefix to Models or Controllers, or preferably both.
任何想法?
推荐答案
我建议你调用你的模型account_model,并像这样引用:
I suggest that you call your model "account_model" and reference it like this:
$this->load->model('account_model', 'account');
$this->account->function();
我知道它不能解决问题,但我认为你可能会找到一个适当的解决方案!
I know it doesn't solve the problem, however I think that you might find it an adequate solution!
这篇关于代码点火器控制器/型号名称冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文