Welcome Guest, Not a member yet? Register   Sign In
Functions availiable from all controllers
#1

[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.
#2

[eluser]Sarfaraz Momin[/eluser]
Create Libraries or Helpers as required. Check the Codeigniter documentation for it.

User guide
#3

[eluser]kgill[/eluser]
Read the user guide this is all covered there.
#4

[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].




Theme © iAndrew 2016 - Forum software by © MyBB