from:http://codeigniter.org.cn/forums/thread-692-1-1.html

 

CI默認(rèn)過濾了$_GET

需要傳遞get參數(shù)時一般直接 /參數(shù)一/參數(shù)二
詳見手冊說明:http://codeigniter.org.cn/user_guide/general/controllers.html#passinguri

但是有時候需要傳遞很長的復(fù)雜的url,比如常用的 http://www.nicewords.cn/index.php/controller/method/?backURL=http://baidu.com/blog/hi

這時 這種模式就行不通了。參數(shù)中本身的/會與默認(rèn)的分隔符沖突

解決方案:

1) 在config.php 中,將‘uri_protocol’ 設(shè)置為 ‘PATH_INFO’.

PHP
$config['uri_protocol'] = "PATH_INFO";
復(fù)制代碼



2) 在需要使用$_GET的之前加:

PHP
parse_str($_SERVER['QUERY_STRING'], $_GET);
復(fù)制代碼



這樣,形如 index.php/blog/list?parm=hello&page=52 就可以運行了。

官網(wǎng)說明:
http://codeigniter.com/wiki/QUERY_STRING_GET/