Codeigniter 3.0适用于localhost但不适用于服务器
I have set up a CI 3 app on localhost (MAMP) and it works fine but when I upload it to the server (Ubuntu 12.04 LAMP) it shows 404 error page. The issue is not with the server configuration because when I upload CI 2.1.4 it works fine. There are no errors in the php error log.
I am using apache2 and php5.5.11
Any help would be very much appreciated. Thanks in advance.
我已经在localhost(MAMP)上设置了一个CI 3应用程序,它工作正常,但当我上传到 服务器(Ubuntu 12.04 LAMP)它显示404错误页面。 问题不在于服务器配置,因为当我上传CI 2.1.4时它工作正常。 php错误日志中没有错误。 p>
我正在使用apache2和php5.5.11 p>
任何帮助都将非常感谢。 提前致谢。 p> div>
It the damn capitalization issue! In CI 3 you must keep all your controllers, models and god knows what else capitalized!
As Abdullah's answer notes, you have to put the capital letter in front of the file name to make them work. Windows has no problems at all since they don't use case sensitive naming as linux/unix do. So as incredible this can sound, if your Windows XAMPP localhost server is working and when you upload it to a Linux/Unix XAMPP and you keep getting 404 errors, try the capital letter first, that could save you some time.