|
楼主 |
发表于 2007-11-12 09:43:59
|
显示全部楼层
PHP复制代码 /*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| www.your-site.com/who/what/where/
|
| You can optionally enable standard query string based URLs:
| www.your-site.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The two other items let you set the query string "words" that will
| invoke your controllers and its functions:
| www.your-site.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm'; 复制代码
在 config.php 里设置,$config['enable_query_strings'] = TRUE; 就可以使用 URL 参数了,下面两个选项是控制器用c=xxxx,控制器方法用m=xxxx,上面的注释说的也很清楚。 |
|