Welcome Guest, Not a member yet? Register   Sign In
MVC and URLs
#2

[eluser]bastones[/eluser]
Remember segment-URLs in CodeIgniter go in this order:

* Class/Controller
* Function
* ID/Value

You could do it as domain.com/mysite/members/U_ID and all members profiles for instance would be the members() function. You can get values of segments by using $this->uri->segment(n) from the URI Class, such as:

$this->uri->segment(3) would fetch the U_ID segment, etc Smile. The URI class is preloaded so no need to load it with $this->load etc Smile.


Messages In This Thread
MVC and URLs - by El Forum - 11-09-2008, 03:03 PM
MVC and URLs - by El Forum - 11-09-2008, 05:56 PM
MVC and URLs - by El Forum - 11-09-2008, 06:45 PM
MVC and URLs - by El Forum - 11-09-2008, 07:01 PM
MVC and URLs - by El Forum - 11-09-2008, 07:30 PM
MVC and URLs - by El Forum - 11-09-2008, 07:46 PM
MVC and URLs - by El Forum - 11-09-2008, 09:45 PM
MVC and URLs - by El Forum - 11-10-2008, 01:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB