[eluser]Colin Williams[/eluser]
When you create a controller in CI, you extend the base class Controller, inheriting all of it's methods and properties. So, if you want something to happen in every controller you create, add it to the class every Controller extends. Two ways to do this. One, copy system/libraries/Controller.php to application/libraries/Controller.php and put your "global" code in the constructor. Two, and this one might be more future-proof, create a file MY_Controller.php in application/libraries/. In that file, create a class MY_Controller that extends Controller. Then, all of your controllers will extend MY_Controller.