gpt4 book ai didi

php - 404 page not found 您请求的页面在 codeigniter 中找不到

转载 作者:可可西里 更新时间:2023-11-01 00:18:55 25 4
gpt4 key购买 nike

我们的代码如下

应用程序/配置/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/”时,显示以下输出

Error image

最佳答案

试试这个

更改$config['index_page'] = 'index.php/home'; $config['index_page'] = '';

.htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1

检查 application/config/routes.php 中的默认 Controller 值

$route['default_controller'] = 'welcome';

检查application/controllers/Welcome.php 是否存在否则根据您的要求更改$route['default_controller']值 p>

关于php - 404 page not found 您请求的页面在 codeigniter 中找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42002599/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com