Welcome Guest, Not a member yet? Register   Sign In
Database driven routes in CodeIgniter
#10

[eluser]Clooner[/eluser]
I use also a form of database driven routes in my CI site and it works really straight forward with no speed loss what so ever. It uses only a couple of lines of code.

It doesn't use hooks or hacks into the system and it uses the standard AR from CI.

In my router file I check if a file exists. If it doesn't exist it uses the default routes which in all cases forwards you to a controller which generates an array from the database. This array contains the routing information. This array is then saved in a cache file. The controller redirects itself and next time the router is accessed the cache file is loaded. The cache file is updated once a day.

Simple, Effective and no speed loss.


Messages In This Thread
Database driven routes in CodeIgniter - by El Forum - 06-28-2009, 10:04 AM
Database driven routes in CodeIgniter - by El Forum - 07-01-2009, 11:42 AM
Database driven routes in CodeIgniter - by El Forum - 07-01-2009, 12:00 PM
Database driven routes in CodeIgniter - by El Forum - 07-01-2009, 12:32 PM
Database driven routes in CodeIgniter - by El Forum - 07-01-2009, 01:41 PM
Database driven routes in CodeIgniter - by El Forum - 07-03-2009, 02:41 PM
Database driven routes in CodeIgniter - by El Forum - 07-03-2009, 03:36 PM
Database driven routes in CodeIgniter - by El Forum - 01-25-2010, 06:30 PM
Database driven routes in CodeIgniter - by El Forum - 02-21-2010, 04:22 AM
Database driven routes in CodeIgniter - by El Forum - 05-15-2010, 04:01 AM
Database driven routes in CodeIgniter - by El Forum - 05-15-2010, 06:29 AM
Database driven routes in CodeIgniter - by El Forum - 05-19-2010, 01:40 PM
Database driven routes in CodeIgniter - by El Forum - 05-20-2010, 02:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB