bluelomo 发表于 2010-12-27 11:00:21

如果在URL后跟参数?如/welcome/index?a=1

由于都走index.php,所以后面跟?a=1就报错了,怎么办?

jeongee 发表于 2010-12-27 11:18:47

CI默认不支持此类GET,请看
http://codeigniter.org.cn/forums/thread-692-1-1.html

fltn03 发表于 2010-12-27 13:53:46

你可以修改application/config/config.php这个文件里面的$config['enable_query_strings']的值,将值设置为TRUE。并在类的方法中使用parse_str($_SERVER['QUERY_STRING'],$_GET);就应该OK了。

Hex 发表于 2010-12-27 22:19:47

楼上的方法不可取。
请看二楼的方法。
页: [1]
查看完整版本: 如果在URL后跟参数?如/welcome/index?a=1