Welcome Guest, Not a member yet? Register   Sign In
Use function in multiple controllers
#1

[eluser]jj135[/eluser]
Hi! I/m new to Code-Igniter. Trying to build my fist application. It's not that hard to get started... Documentation is pretty good.

I have a question: How do I create a function I can use in more than one controller? For example a logout function. Or a function that checks if a user is logged in? I can create this function in a controller itself and use it ($this->functionname()) but if I want to use this function in multiple controllers, where do I store it and how do I call it?

Thanks!


Messages In This Thread
Use function in multiple controllers - by El Forum - 01-11-2010, 10:44 AM
Use function in multiple controllers - by El Forum - 01-11-2010, 10:49 AM
Use function in multiple controllers - by El Forum - 01-11-2010, 11:13 AM
Use function in multiple controllers - by El Forum - 01-11-2010, 11:29 AM
Use function in multiple controllers - by El Forum - 01-11-2010, 11:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB