Welcome Guest, Not a member yet? Register   Sign In
URL routing with query_strings_enabled not working
#1

[eluser]topherdan1[/eluser]
Hello,

I am trying to allow my application to use query strings while still keeping the friendly URL routing. I have followed the instructions of updating enable_query_strings in the config file and then trying uri_protocol = PATH_INFO, REQUEST_URI, and the others. However I still am not able to see the GET variables in my controllers.

It seems like people have had the most success with PATH_INFO as the uri_protocol. When I print_r($_SERVER[]), however, the PATH_INFO variable is not there. I am using a standard installation of wamp on Windows Vista.

Anyone have a suggestion?

Thanks!
#2

[eluser]n0xie[/eluser]
Try this http://ellislab.com/forums/viewthread/120460/
#3

[eluser]topherdan1[/eluser]
Thanks for the reply.

Yes, I gave that a try. The GET variables are still not made available in the controller. Also, when I try to use get variables on the front page (ie http://localhost/?test=true) the code throws an error (<p>Severity: Notice</p>
<p>Message: Undefined offset: 0</p>
<p>Filename: libraries/Router.php</p>
<p>Line Number: 207</p>)

Any ideas on how to get PATH_INFO to work?
#4

[eluser]TheFuzzy0ne[/eluser]
If I remember correctly, you need to use $this->input->get() to grab something from a query string.
#5

[eluser]topherdan1[/eluser]
Yes, I am trying to print my variables using that function. For example, I am opening: http://localhost/users/?test=true and then trying: print_r($this->input->get('test')) but it returns nothing. I still think it may have something to do with PATH_INFO not functioning.




Theme © iAndrew 2016 - Forum software by © MyBB