Welcome Guest, Not a member yet? Register   Sign In
SEO URIs *AND* $_GET requests - /controller/function/?myvar=1
#6

[eluser]Neophyte[/eluser]
[quote author="Lovecannon" date="1204187790"]It takes one line to enable get...without having to override anything..just add this to anywhere you want $_GET...
Code:
parse_str($_SERVER['QUERY_STRING'],$_GET);
[/quote]

With that approach any URI in the form of /controller/method/?q=Search+Terms+Here will not work as CI will no longer grab the controller and method segments. So you'll probably end up with a 404 error.

Pygons approach initially clears any GET data so CI will parse out the segments allowing CIs routing to work as expected then a little further on in execution once CI has decided on all the segments and knows the controller and method to be called the GET data is re-initialised ready for use with the input library.


Messages In This Thread
SEO URIs *AND* $_GET requests - /controller/function/?myvar=1 - by El Forum - 02-28-2008, 04:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB