Welcome Guest, Not a member yet? Register   Sign In
Help with URI routes
#3

[eluser]louis w[/eluser]
This is automatically built in. The Router will do a check to see if there is a folder with the name of segment 1 and a file with the name of the second segment.

In your example you would have this directory structure:
Code:
* application
  * controllers
    * folder
      * Function.php

The only caveat is your naming. This is not a function, its a class. Every controller has to be a class which contains methods (functions).

Check out line 189 of Router.php in the system/libraries folder. This will show you how CI loads cotrollers. If you want to change how this happens you can copy this file into your application/libaries folder and rename to MY_Router.php

Hope this info helps.


Messages In This Thread
Help with URI routes - by El Forum - 04-10-2008, 05:14 PM
Help with URI routes - by El Forum - 04-10-2008, 07:44 PM
Help with URI routes - by El Forum - 04-10-2008, 08:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB