我正在使用 CodeIgniter 3.0.3
并且在 linux
上运行我的应用程序时遇到问题,如果 controller name
开始于小写
字符,如果我用大写的第一个字符重命名 Controller ,那么它就可以工作。
我在 xampp 上试过它在那里工作, Controller 名称以小写字符开头。
是否需要更改任何设置才能使我的应用程序使用以 小写
开头的 controller name
,或者重命名所有 Controller 并将第一个字符设为大写?
我知道重命名所有 Controller 并不是一项艰巨的任务,但我需要知道是否有任何解决方法。
提前感谢您的宝贵时间。
最佳答案
在 Codeigniter 3 中,您必须创建文件名以大写开头。文件名表示模型和 Controller 。
And in Windows it will work when its in small capes. But in linux it will not. Its Case-Sensitive.
关于php - 如果 Controller 文件在 Linux 上为小写,CodeIgniter 返回 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34612789/