I agree there should be a way to handle GET requests in CI .
For example I am building some kind of affiliate program at the moment. Customers paste some code in an iframe on their webseite and this code passes parameters to CI. It is very handy to pass those parameters as “GET parameters”. It seems like the most simple and clear solution cause the customer himself can tweak the code (which in my case is a good thing).
I don’t want to use GET all the time. Just where it really makes sense.
In a sensational development earlier today, Code Igniter Shocki claimed that Derek Allard could be right. The claim was a total surprise to other Igniters, some of whom were quick to express their disbelief. Allard himself was unavailable for comment, but a spokesperson said “This doesn’t sound like Derek. We are prepared to refute Shocki’s claim subject to legal advice”. Several Igniters are thought to be seeking solace in their favourite refreshments while recovering from the news.
I’m not arguing about get, and I don’t want to debate it on this thread, but could you just use an affiliate link like this
http://www.shockis-site.com/affiliate/123
I am using GET paramaters for integration too.
Sometimes you can not define the URL. Some systems need to know callback URL. The foreign system adds GET parameters to callback URL. It would be very stupid to insist that my web can not accept GET parameters in callback URL.
GET is standard. CI should accept standards.
Think about it please.
An Input::get() feature is something that’s been requested… many times. If this isn’t the thread to debate its merits, it can only be because there is no debate, and it’s obviously a glaring omission. You can use uri_to_assoc() instead, but frankly, I think it’s reinventing the wheel, and I don’t know that it can handle input arrays.
I said I didn’t want to debate it on this thread. If you want to debate it, then this thread is absolutely the place. You should feel free to continue expressing this as much you want to. I for one am staying out of it (as I always have on the issue of get) - I was only trying to offer support to a member of the CI community.
I know you didn’t suggest otherwise, but I want to be clear - my writing was a specific solution in response to a specific problem - not a general statement on the relative merits of CI supporting a get library.
Having used Champs’s classes successfully last year on a CI 1.5.4 project I am just trying to get them working with CI 1.6.3 and thought I’d share my findings. Basically It would only work for me if I set
$config['uri_protocol'] = "PATH_INFO";
in config.php.
So anyway, it seems to work just fine now, but if anybody knows of any negative effects I might have just introduced by this change please shout!
As Oliver mentioned, setting the uri_protocol to “PATH_INFO” will do, but you can also have it working without any hacks or extension by enabling query strings in config.php.
As Oliver mentioned, setting the uri_protocol to “PATH_INFO” will do, but you can also have it working without any hacks or extension by enabling query strings in config.php.
Seriously, this tip should be stickied somewhere, it’s the fifth time I’ve post it.
marcoss - Thank you so much for this simple fix, I’ve been itching to get query strings working with segmented URLs for over a year now. Personally I vote for this to be the default configuration, but I agree, it should at least be made very clear how to accomplish this behavior in the documentation. Thanks!!