variable subdirectory |
[eluser]Unknown[/eluser]
I didn't know how to make the title relevant so please read: I have a "home" controller, and I want it to check the url for something like this "index.php/home/variable", and then perform tasks based on the variable directory. Is there a way to do this with codeigniter?
[eluser]BrianDHall[/eluser]
Sure, use the URI Class Manual Code: $segs = $this->uri->segment_array(); That will give you an idea of how that works, so in your constructor for instance you can check the segments for whatever you want and do whatever it is that you wanted to do.
[eluser]Unknown[/eluser]
Thank you so much! It's much easier than I expected
[eluser]BrianDHall[/eluser]
You'll find you will say that a lot the more you use CI |
Welcome Guest, Not a member yet? Register Sign In |