URI.php error when passing parameter with : (colon) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: URI.php error when passing parameter with : (colon) (/showthread.php?tid=39421) |
URI.php error when passing parameter with : (colon) - El Forum - 03-10-2011 [eluser]Unknown[/eluser] i got an error yesterday when passing parameter with : (colon) http://kimci.detanto.net/hrd/member/999:2 i need to pass that value because i will use one function to display several list, in this case 999 is the identity of the member, 2 is the option. in my case 1 is "experience", 2 is "job description", and so on, so i need to pass the ":" string.. while researching, i find that on URI.php, there is additional procedure on _fetch_uri_string that is Code: if ($uri = $this->_detect_uri()) Code: $uri = parse_url($uri, PHP_URL_PATH); Code: $uri = str_replace(":","~",$uri); At first, i create MY_URI because i don't want to change CI core, but it didn't work, because _detect_uri is a private function, so i have to change the CI core .. is there any other way to fix it? URI.php error when passing parameter with : (colon) - El Forum - 04-19-2011 [eluser]zivel[/eluser] I have the same behavior. Is this a PHP Bug? Because after some investigation I found out: Code: WORKS: Code: DOES NOT WORK any idea? (here my testcode) Code: $url= array( URI.php error when passing parameter with : (colon) - El Forum - 04-19-2011 [eluser]InsiteFX[/eluser] Try this. Code: $uri = parse_url($uri, urlencode(PHP_URL_PATH)); InsiteFX URI.php error when passing parameter with : (colon) - El Forum - 04-20-2011 [eluser]zivel[/eluser] Thats It! Thank you InsiteFX! I changed now line 196 in /system/core/URI.php from Code: $uri =parse_url($uri, PHP_URL_PATH); Code: $uri = urldecode(parse_url(urlencode($uri), PHP_URL_PATH)); As a new member of this community, what should I do that this change is integrated into CodeIginter? Fill in a Bug report? Thank you - Renato |