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

查看:92
本文介绍了Codeigniter网站在Google Virtual Instant Live服务器上显示错误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 阿帕奇2 php7.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服务器上显示错误404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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