Codeigniter is the most popular open source PHP framework. It is very easy to use and very lightweight. The Codeigniter can be used to develop any kind of web project from small website to large scale of application. Here is the list of most popular and most asked Codeigniter Interview Questions with Answers for both beginners and experienced PHP programmers.
1. What is Codeigniter?
Codeigniter is the most popular open source PHP framework. It is very simple and lightweight. It can be used to develop any kind of web project from small website to large scale of application.
2. Why use Hooks in Codeigniter
Hooks are the special feature of Codeigniter that allows to change the inner functionality of framework without making any change in core files of framework. The Hooks are defined in application/config/hooks.php.
3. What is routing in Codeigniter?
Instead of accessing files directly from browser, Routing enables to serve files differently. Routing is an important part of Codeigniter that enables to customize default URL pattern according to requirement to use your own and it redirect automatically to matched URL pattern by specified controller and function.
4. How to load Model in CodeIgniter?
Models are PHP classes that are designed to work with information in your database. In CodeIgniter, Model classes are stored in your application/models/ folder. The models will typically be loaded and called from within your controller functions. To load a model you will use the following function:
5. What are the Helpers in CodeIgniter?
The Helpers are the group of functions in a specific category that helps to perform particular functions. There are many helpers in CodeIgniter that you can use according to your requirement. The major CodeIgniter helpers are URL Helpers that assist in creating link, Form Helpers that help you create form elements, Text Helpers to perform various text formatting routines, Cookie Helpers to set and read cookies, File Helpers to help you deal with files etc.