我们的代码如下:
以下是我们的代码
应用程序/配置/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
application/config/database.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