Welcome Guest, Not a member yet? Register   Sign In
Create extra functions
#1

[eluser]Nukede[/eluser]
Hi all! I have a question about extra functions. If i will create functions in my_controller.php, they can be called from outside. For example, I want to create menu on the web site, so I add the function "menu" write code and I can call it outside:
Quote:mysite.com/index.php/my_controller/menu
.
So, user will see only menus, but not all web site.
Сan you give some recommendation about this or links, where create simple web project in CI?
Sorry for the bad english
#2

[eluser]OliverHR[/eluser]
In a normal way just the controllers that extends MY_Controller inherit this function, it will be a better idea if you can use a function from other controllers make a library or a helper.
#3

[eluser]Nukede[/eluser]
Ok, if i create library, how can i get access to the view? For example, I want to use a cycle "for", but the data is transferred to the array.
#4

[eluser]CodeIgniteMe[/eluser]
You can read user_guide
http://ellislab.com/codeigniter/user-gui...views.html




Theme © iAndrew 2016 - Forum software by © MyBB