Welcome Guest, Not a member yet? Register   Sign In
$this->uri->segment(#) not working
#2

[eluser]bretticus[/eluser]
[quote author="JayArias" date="1264231779"]I am trying to retrieve /people/USERNAME. But for some reason I get a 404 Error when requesting the segment.

Code:
$this->uri->segment(3)
[/quote]

You get a 404 only when you call $this->uri->segment(3) in your code?? That doesn't make sense. Is people your controller or a controller method? From the looks of your URL, it's your controller. Since the 2nd segment is typically reserved for your action/function/method, I doubt that you have methods for each username. Perhaps, you need to access the method? ie.

/people/person/USERNAME assuming you name your method "person."

Yes, routes would be perfect for this scenario if you want to drop the method from the URL. What have you tried thus far?


Messages In This Thread
$this->uri->segment(#) not working - by El Forum - 01-22-2010, 07:29 PM
$this->uri->segment(#) not working - by El Forum - 01-22-2010, 08:06 PM
$this->uri->segment(#) not working - by El Forum - 01-22-2010, 08:30 PM
$this->uri->segment(#) not working - by El Forum - 01-22-2010, 09:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB