codeigniter 使用 base url 中的控制器名称

codeigniter using the name of controller in base url

我正在使用 codeigniter 开发一个项目。当我 运行 控制器然后它包含 jquery 和 css 的所有文件时,我卡在了 baseurl 中。但是当我运行一个函数然后url的jquery加上控制器的名字。

这是我的基地url:$config['base_url'] = 'http://localhost/cod_login/';

我不知道为什么 codeigniter 会那样做。

Base URL 错误。应该是这样

$config['base_url'] = 'http://localhost/cod_login/';

$config['base_url'] = 'http://localhost/poject_name'; # syntax
$config['base_url'] = 'http://whosebug.com/'; # example

在路线中

$route['default_controller'] = "defult_controler_name";
$route['404_override'] = '';

当您不回显基础时会发生这种情况 URL 只有(回显)丢失,感谢大家的回答