Run code in every controller

#1
[eluser]Unknown[/eluser]
Hi,

I was wondering if it was possible to run a certain piece of code in every controller withouth having to put it in there manually?

#2
[eluser]richthegeek[/eluser]
Hooks.

#3
[eluser]Dam1an[/eluser]
Or you can extend the base controller and put all your common stuff in there

#4
[eluser]jedd[/eluser]
[quote author="maigel" date="1251425172"]Hi,

I was wondering if it was possible to run a certain piece of code in every controller withouth having to put it in there manually?[/quote]

Hey maigel,

Check out the [url="http://codeigniter.com/wiki/Header_and_footer_and_menu_on_every_page/"]wiki page on repeating code in every controller[/url]


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.