CodeIgniter:404在Live Server上找不到页面 [英] CodeIgniter: 404 Page Not Found on Live Server

查看:568
本文介绍了CodeIgniter:404在Live Server上找不到页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在用CodeIgniter开发一个小的web应用程序。在本地测试之后,我把它放在我的web服务器上,允许一对夫妇测试一些功能。导航到网站时: -

I have been developing a small web application with CodeIgniter. After testing it out locally I went to put it on my web server to allow a couple other people test out some features. While navigating to the site I get: -


404页面未找到错误页

404 Page Not Found error page

在我的本地计算机上查看它时,一切都会完全加载并运行。

When viewing it in my local machine everything loads up and runs perfectly.

这是我上传到 public_html 目录:

This is what I uploaded to the public_html directory:

application directory
system directory
assets directory (my assets for the site)
index.php

public_html 目录中。像我说的,它给了我CodeIgniters 404错误页面,所以我知道这是至少看到CodeIgniter。我还尝试将 config.php 中的 $ config ['base_url'] 更改为我的URL。更改或留空时出现同样的错误。
我检查了我的路由,所有这些似乎是正确的。

All of those are in the public_html directory. Like I said, it does give me CodeIgniters 404 error page, so I do know it is at least seeing CodeIgniter. I also tried changing the $config['base_url'], in the config.php, to my URL. Same error when changing that or leaving it blank. I checked my routes, and all those seem correct. Everything also loads up just fine when navigating to it on my local machine.

我也没有使用 .htaccess 文件

对我应该尝试什么建议?

非常感谢!

Any suggestions on what I should try?
Thanks a lot!

推荐答案

您正在使用MVC with OOPS Concept。所以有一些规则。

You are using MVC with OOPS Concept. So there are some certain rules.

1)您的类名(即:控制器名称)应以大写字母开头。

1) Your class name (ie: controller name) should be start with capital Letter.

您的控制器名称为'icecream'。应该是' cecream'

e.g.: your controller name is 'icecream'. that should be 'Icecream'

在localhost它可能不是强制性的,但在服务器会检查所有这些规则,否则它可以无法检测到正确的类名。

In localhost it might not be compulsory, but in server it will check all these rules, else it can't detect the right class name.

这篇关于CodeIgniter:404在Live Server上找不到页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆