Codeigniter 网站在 Google Virtual Instant Live Server 上显示错误 404 [英] Codeigniter website showing error 404 on Google Virtual Instant Live Server

查看:27
本文介绍了Codeigniter 网站在 Google Virtual Instant Live Server 上显示错误 404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 Wamp 和 XAMPP 在我的本地主机上打开我的 Codeigniter 网站时,两者都有效.但是当我将它移动到 Google Cloud 上的 Ubuntu 时,它只适用于第一页,然后在转到另一个页面时显示错误.

When I go open up my Codeigniter website on my localhost using Wamp and XAMPP, both works. But when I move it to Ubuntu on Google Cloud, it only works for the first page, afterward, it shows the error when going to another page.

我正在使用:

Codeigniter 版本 3阿帕奇2php7.3

Codeigniter ver 3 Apache2 php7.3

有谁知道这可能是什么原因造成的?

Does anyone know what might have caused this?

其他页面

推荐答案

最好先检查 class 名称和 record 名称,两者都应该是标题大小写(以大写字母开头).

It would be ideal if you check first the class name and the record name that both should be title case (start with a capital letter).

所以如果类名是'controller.php',文件名必须是'Controller.php',否则CodeIgniter会抛出404错误.

So if the class name is 'controller.php', the file name needs to be 'Controller.php', otherwise, CodeIgniter will throw a 404 error.

localhost中可能不是必须的,但是在server中它会检查这些标准中的每一个,否则它无法区分正确的类名.

In localhost it probably won't be obligatory, yet in server it will check every one of these standards, else it can't distinguish the correct class name.

这篇关于Codeigniter 网站在 Google Virtual Instant Live Server 上显示错误 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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