1

我的 codeigniter 应用程序配置:

$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=someMethod 结果是404 Not Found

日志文件说:

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

编辑

回答:

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

4

1 回答 1

1

您可以像这样访问它们

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
于 2011-08-11T08:15:33.007 回答