Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save smeghead/894446 to your computer and use it in GitHub Desktop.
Save smeghead/894446 to your computer and use it in GitHub Desktop.
CodeIgniter1.7.3 will enable to use QUERY_STRING.
--- system/libraries/URI.php.org 2011-03-30 21:36:00.730915376 +0800
+++ system/libraries/URI.php 2011-03-30 21:56:32.270865996 +0800
@@ -228,7 +228,9 @@
*/
function _explode_segments()
{
- foreach(explode("/", preg_replace("|/*(.+?)/*$|", "\\1", $this->uri_string)) as $val)
+ //befor parse segments, omit query_string.
+ $uri_string = preg_replace("/\?.*/", '', $this->uri_string);
+ foreach(explode("/", preg_replace("|/*(.+?)/*$|", "\\1", $uri_string)) as $val)
{
// Filter segments for security
$val = trim($this->_filter_uri($val));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment