Welcome Guest, Not a member yet? Register   Sign In
routes bug ?
#1

[eluser]EugeneS[/eluser]
in routes.php i have:
Code:
$route['contacts'] = 'welcome/index/2';

then i go to the url like:
http://localhost/contacts

yes i'm in the class "welcome" method "index" but when i'm trying to access url segments it doesnt work:
Code:
echo $page_id = $this->uri->segment(1, 1);
result: contacts

echo $page_id = $this->uri->segment(2, 1);
result: 1

echo $page_id = $this->uri->segment(3, 1);
result: 1

i was thinking it should be
Code:
echo $page_id = $this->uri->segment(1, 1);
result: welcome

echo $page_id = $this->uri->segment(2, 1);
result: index

echo $page_id = $this->uri->segment(3, 1);
result: 2

my expectations are wrong or its bug ?


Messages In This Thread
routes bug ? - by El Forum - 03-23-2008, 05:59 PM
routes bug ? - by El Forum - 03-23-2008, 06:14 PM
routes bug ? - by El Forum - 03-23-2008, 06:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB