CodeIgniter扩展核心控制器 [英] CodeIgniter Extended Core Controller
问题描述
我在本地的WAMP服务器上设置了CodeIgniter应用程序,一切都很好。我的所有类都扩展我的控制器(MY_Controller)
然而,当应用程序是在基于Linux的实时环境,它抛出一个错误,MY_Controller类不'
我忘了一个配置变量在某处或类似的东西,有一个路径到application / core文件夹?
我在Google上找到了同样问题的其他线程,发现一个解决方案适用于大多数使用 parent :: Controller();
文件名可能是不正确的(例如:My_controller而不是My_Controller),并且您的联机环境区分大小写,您的本地环境为case_insensitive。我有这个问题很多
I'm stumped on this one.
With my CodeIgniter application set up on a WAMP server locally, everything is fine. All of my classes extend my controller (MY_Controller)
However, when the application is on the live environment which is Linux based, it throws an error that the MY_Controller class doesn't exist.
Have I forgot about a configuration variable somewhere or something like that with a path to the application/core folder?
I've looked for other threads with the same issue across Google, found a solution that worked for most people of using parent::Controller();
instead of parent::__construct()
but that doesn't resolve this for me.
Is it possible that the case of the filename is incorrect (ex: My_controller instead of My_Controller) and your online environment is case sensitive and your local environment is case_insensitive. I've had that problem a lot
这篇关于CodeIgniter扩展核心控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!