[英]CodeIgniter returning 404 if controller files are in lowercase on linux
I am using CodeIgniter 3.0.3
and having problem in running my app on linux
, It is returning 404 if controller name
starts in lowercase
character, If I rename the controller with first char in uppercase then it is working. 我正在使用
CodeIgniter 3.0.3
并且在linux
上运行我的应用程序时出现问题,如果controller name
以lowercase
字符开头,则返回404,如果我用大写的第一个字符重命名控制器,那么它正在工作。
I've tried on xampp it is working there with controller name starts with lowercase character . 我试过xampp它在那里工作,控制器名称以小写字符开头。
Is there any setting I have to change to make my app work with controller name
starts in lowercase
, or rename all controller with first char in uppercase? 是否有任何设置我必须更改以使我的应用程序使用
controller name
以lowercase
开头,或者使用大写的第一个字符重命名所有控制器?
I know that it is not a tough task to rename all the controllers, but I need to know if there is any workaround. 我知道重命名所有控制器并不是一项艰巨的任务,但我需要知道是否有任何解决方法。
Thanks in advance for your precious time. 提前感谢您的宝贵时间。
In Codeigniter 3 you have to create file names with caps in first . 在Codeigniter 3中,您必须首先创建带有大写字母的文件名 。 File names means Model and Controller .
文件名表示模型和控制器 。
And in Windows it will work when its in small capes.
在Windows中它可以在小披风中使用。 But in linux it will not.
但在linux中它不会。 Its Case-Sensitive.
它区分大小写。
In codeigniter 3,controller and model name must start with title case.ex- Home,Registration. 在codeigniter 3中,控制器和型号名称必须以标题case.ex- Home,Registration开头。
Window is not case-sensitive. 窗口不区分大小写。 Linux base server is case-sensitive.
Linux基本服务器区分大小写。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.