【发布时间】:2017-06-19 13:07:43
【问题描述】:
我们的代码如下
应用程序/config/config.php
$config['base_url'] = 'http://myworldmirror.com/';
$config['index_page'] = 'index.php/home';
.htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Options -Indexes
应用程序/配置/数据库.php
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'newsels1',
'password' => 'newsels1',
'database' => 'newsels1',
'dbdriver' => 'mysql',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
输出
当我打开这个网址“http://myworldmirror.com/”时,会显示下面的输出
【问题讨论】:
-
将
config['index_page'] = 'index.php/home';更改为config['index_page'] = ''; -
你好 mohammad 试试这个代码但显示同样的错误
-
解决了我的问题:谢谢兄弟
标签: php .htaccess codeigniter