Welcome Guest, Not a member yet? Register   Sign In
How to call controllers from a database?
#3

[eluser]mddd[/eluser]
Using the database for this is inefficient. Every request will cause the database to be queried for information that is not likely to change often.
You could just as easily include a php script like this:
Code:
define('CONTROLLERS', 'blog|forum');

In stead of reading and checking from the database you would then check in your hook:
Code:
if (in_array($controller, explode('|', CONTROLLERS)))
{
// go on to the controller
}
else
{
// controller not allowed -- show error
}


Messages In This Thread
How to call controllers from a database? - by El Forum - 08-21-2010, 11:57 AM
How to call controllers from a database? - by El Forum - 08-22-2010, 08:14 AM
How to call controllers from a database? - by El Forum - 08-22-2010, 08:52 AM
How to call controllers from a database? - by El Forum - 08-22-2010, 09:40 AM
How to call controllers from a database? - by El Forum - 08-22-2010, 07:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB