php – 404页面找不到你请求的页面在codeigniter中找不到
发布时间:2020-12-13 21:56:42 所属栏目:PHP教程 来源:网络整理
导读:我们的代码如下 应用/配置/ config.php中 $config['base_url'] = 'http://myworldmirror.com/'; $config['index_page'] = 'index.php/home'; 的.htaccess RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME}
我们的代码如下
应用/配置/ 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 应用/配置/ 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 ); 产量 当我打开此URL“http://myworldmirror.com/”时,会显示以下输出 解决方法
试试这个
更改$config [‘index_page’] =’index.php / home’; To $config [‘index_page’] =”; 的.htaccess RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$index.php?$1 检查application / config / routes.php中的默认控制器值 $route [‘default_controller’] =’welcome’; 检查application / controllers / Welcome.php是否存在,否则将$route [‘default_controller’]值更改为您的要求 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |