我如何访问"application/controllers"子目录下的控制器?当$config[&#


how do I access controller that is in sub directory of "application/controllers" when $config['enable_query_strings'] = TRUE

my codeigniter application config:

$config['enable_query_strings'] = TRUE;
$config['uri_protocol'] = 'PATH_INFO';

所以我可以这样访问我的应用程序:index.php?c=index&m=about

但是我在"application/controllers/setting/"目录下有一个名为user.php的控制器

如果mod_rewrite是启用的,我可以访问:index.php/setting/user/someMethod

但是我如何像这样访问它:index.php?c=setting/user&m=someMethod404 Not Found

日志文件显示:

ERROR - 2011-08-11 08:03:07 --> 404 Page Not Found --> settinguser

编辑

答:

index.php?d=setting&c=user&m=someMethod

您可以像这样访问它们

index.php?d=setting&c=user&m=someMethod

如果您有子目录,则需要目录触发器。它在你的config.php文件中,但是它有experimental注释。

$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use