![]() |
need to use $_GET on one page - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: need to use $_GET on one page (/showthread.php?tid=2190) |
need to use $_GET on one page - El Forum - 07-21-2007 [eluser]neelp[/eluser] I am using a third party interface and they will be sending me one parameter in the query string: http://www.mysite.com/home.php?token=abc123. Since $_GET is disabled, does anyone know a good way I can get around this? I only need $_GET for this one page. Thanks. need to use $_GET on one page - El Forum - 07-21-2007 [eluser]Imkow@CN[/eluser] my english isn't great , so i cut the following piece directly from ci docs. Quote:Enabling Query Strings need to use $_GET on one page - El Forum - 07-21-2007 [eluser]Glen Swinfield[/eluser] Perhaps you could use a pre-system or pre-controller hook that checks the URL for a GET var and then saves ti for use in a variable, or session or something. Also you could use .htaccess mod_rewrite to check the url and redirect to http://www.mysite.com/home/token/abc123 and then deal with the page as usual. need to use $_GET on one page - El Forum - 07-21-2007 [eluser]neelp[/eluser] Thanks Codepat. Those both sound like good ideas. I will try them out. need to use $_GET on one page - El Forum - 07-21-2007 [eluser]Al James[/eluser] Hi there... This thread has a full discussion: http://ellislab.com/forums/viewthread/56389/ Briefly: If you only need it in a few pages. 1) Set your config item 'uri_protocol' to 'PATH_INFO'. Code: $config['uri_protocol'] = "PATH_INFO"; 2) Use this line to rebuild the $_GET array (in your controller) Code: parse_str($_SERVER['QUERY_STRING'],$_GET); If you need it site wide Look at: http://ellislab.com/forums/viewthread/56389/#277621 |