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

[eluser]xwero[/eluser]
[quote author="Pygon" date="1204743806"]unfortunately no xwero

CI_URI/CI_Router keys off $_GET[0] and $_GET[1] prior to CI_Input class ever loading, so /index.php/1/2?3&4;will actually take you to controller 3, function 4.[/quote]
I just tested it with the urls like /index.php/some/segment?one=1&two=2&three=3 /index.php/some/segment/?one=1&two=2&three=3 and to check i added to the method following
Code:
var_dump($this->input->get('one'));
var_dump($this->input->get('two'));
var_dump($this->input->get('three'));
and i got this result
string(1) "1"
string(1) "2"
string(1) "3"

The only reason i could think about why CI cuts off the fist two segments is because the enable_query_strings config variable is set to true.


Messages In This Thread
SEO URIs *AND* $_GET requests - /controller/function/?myvar=1 - by El Forum - 03-05-2008, 07:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB