PHP codeIgniter应用程序无法打开,除了默认的控制器的任何页面 [英] PHP CodeIgniter application not opening any page except default controller

查看:321
本文介绍了PHP codeIgniter应用程序无法打开,除了默认的控制器的任何页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站托管于域seeingtheworld.org和我的的htaccess 如下:

My website was hosted on domain seeingtheworld.org and my htaccess was as follows:

php_value upload_max_filesize 1024M
php_value post_max_size 1024M
php_value max_execution_time 2700
php_value max_input_time 2700

Options +FollowSymlinks
RewriteEngine On
RewriteBase /seeingtheworld
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

这是工作正常的链接。 http://seeing-the-world.org/

This is the link working fine. http://seeing-the-world.org/

现在我已经托管在openshift本网站

Now I have hosted this site on openshift

http://stw-ciapps.rhcloud.com/

有只打开主页和没有其它网页。正如我家指定为默认的控制器和不知道是什么,我应该在的htaccess 更改此openshift。 如果我htaccess的话,为什么默认的根目录

It is only opening the home page and no other page. As I have specified home as default controller and do not know what I should change in htaccess for this openshift. If I have htaccess then why default root

推荐答案

原来我的问题是有点不相关。我不得不重新命名我的默认控制器PHP文件为小写和控制器类的名称为小写,一切都开始工作。当CI查找默认的控制器文件,它会搜索以小写的文件;如果我的名字我的控制器文件Home.php,而不是home.php,CI怀念它在Linux(因为Linux的文件系统是区分大小写)。

Turns out my problem was somewhat unrelated. I had to rename my default controller php file to lowercase and the controller class name to lowercase and everything started to work. When CI looks for the default controller file, it searches in lowercase for the file; if I name my controller file "Home.php" instead of "home.php," CI misses it on Linux (since Linux file systems are case sensitive).

这篇关于PHP codeIgniter应用程序无法打开,除了默认的控制器的任何页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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