Welcome Guest, Not a member yet? Register   Sign In
Numbers in URI
#2

[eluser]Sverri[/eluser]
[quote author="JonoB" date="1300126903"]http://localhost/ci/foo/bar/test:2
FAIL
Code:
A PHP Error was encountered
Severity: Warning
Message: parse_url(/foo/bar/test:2) [function.parse-url]: Unable to parse URL
Filename: core/URI.php
Line Number: 176
[/quote]

It seems parse_url() has a problem with the colon in your URI.

Try changing line 176 in core/URI.php...

Code:
$uri = parse_url($uri, PHP_URL_PATH);

To this...

Code:
if (strpos($uri, ':') !== FALSE)
{
  $uri = parse_url(str_replace(':','~!!!~',$uri), PHP_URL_PATH);
  
  $uri = str_replace('~!!!~',':',$uri);
}
else $uri = parse_url($uri, PHP_URL_PATH);

You can also, if at all possible, just use / instead of : and then just fetch the number as a segment.


Messages In This Thread
Numbers in URI - by El Forum - 03-14-2011, 07:21 AM
Numbers in URI - by El Forum - 03-14-2011, 12:48 PM
Numbers in URI - by El Forum - 03-15-2011, 03:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB