1

私のcodeigniterアプリケーション構成:

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

だから私はこのように私のアプリケーションにアクセスすることができます:index.php?c=index&m=about

しかし、私は「application / controllers /settings/」ディレクトリに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 に答える