Need urgent help - Common method for all controller |
[eluser]CroNiX[/eluser]
Create a MY_Controller, which is a base controller. This special controller will be called immediately before your normal controllers that extend it. All of your normal controllers that you want the logging enabled would extend MY_Controller instead of CI_Controller. http://ellislab.com/codeigniter/user-gui...asses.html /application/core/MY_Controller.php Code: class MY_Controller extends CI_Controller { Then your other controllers that you want to do the automatic logging: Code: class Other_controller extends MY_Controller { If you don't want something to be logged, then have that controller extend CI_Controller like normal. |
Welcome Guest, Not a member yet? Register Sign In |