Functions availiable from all controllers |
[eluser]Bl4ckB1rD[/eluser]
Where should i put functions to make them availiable in all controllers that i have? Is there a way to call functions from one controller to another controller, so i dont have to copy paste the function's code? Some example would be great.
[eluser]Sarfaraz Momin[/eluser]
Create Libraries or Helpers as required. Check the Codeigniter documentation for it. User guide
[eluser]jedd[/eluser]
[quote author="Bl4ckB1rD" date="1266751698"]Where should i put functions to make them availiable in all controllers that i have? Is there a way to call functions from one controller to another controller, so i dont have to copy paste the function's code? Some example would be great.[/quote] Better yet, read the [url="/wiki/FAQ"]FAQ[/url] - particularly the first question in the Design section. Then go and read about [url="/wiki/MY_Controller"]MY_Controller[/url]. |
Welcome Guest, Not a member yet? Register Sign In |