【发布时间】:2015-06-16 07:36:18
【问题描述】:
我在本地机器上做了一些应用程序,运行正常,但是在将其发送到服务器后,我收到 404 错误页面,我尝试了所有方法,但都没有奏效,你能帮我吗?
a2enmod 重写已开启。
我在 google 中发现我需要在服务器中使用与本地机器中相同版本的 php,否则我的应用程序将无法运行,这是真的吗?
我的本地: 应用程序/config/config.php
$config['base_url'] = 'http://localhost:8888/app/';
$config['index_page'] = 'index.php';
我的服务器: 应用程序/config/config.php
$config['base_url'] = 'http://example.com/app';
$config['index_page'] = 'index.php';
我也试过: 应用程序/config/config.php
$config['base_url'] = '';
$config['index_page'] = '';
我被卡住了,你能帮我解决这个问题吗?
【问题讨论】:
-
你到底在做什么?
-
如果您使用 codeigniter 3.0,请确保您的所有控制器和模型都以大写字母开头 Welcome.php forum.codeigniter.com/thread-62172.html more htaccess github.com/riwakawebsitedesigns/htaccess_for_codeigniter
-
OMG :),你对的家伙,我刚刚将我的控制器 = 从 user.php 重命名为 User.php ,并且在网站上完美运行,赞成 :) 谢谢你,只是一个问题你知道为什么那会发生吗?我现在只是好奇。
-
wolfgang1983 你可以留下答案,我会支持你,干杯老兄。
标签: php codeigniter