InterviewSolution
Saved Bookmarks
| 1. |
What is a helper in CodeIgnitor and how it can be loaded. |
|
Answer» Helper as the name suggests functions which aid to your program. Helper is simply a collection of functions in a PARTICULAR category. There are VARIOUS types of helpers like URL helpers, Form helpers, Text helpers, COOKIES helper, FILE helpers, etc. Helpers are independent procedural functions. A helper can be loaded in controller constructor which makes them available globally. A helper can be loaded like: $this->load->helper(‘file_name’); // It will load file helper. To load URL in helper use URL. $this->load->helper(‘url’);To load multiple helpers : $this->load->helper->array(‘first_helper’,’second_helper’,’third_helper’); |
|