Get parameters in Code Igniter

If you want to use GET parameters in Code igniter just for specific controller do use the following line in your Controller’s constructor:

parse_str($_SERVER['QUERY_STRING'],$_GET);

Also make sure to call your script like this (even if you use mod_rewrite to get rid of index.php):

www.example.com/index.php/controller/method/?par1=1&par2=2

Comments

comments powered by Disqus