CODEIGNITER Interview Questions and Answers

CodeIgniter is a free, light weight,fast and Application Development Framework for building web sites using PHP. It is based on MVC i.e. Model-View-Controller design pattern.It helps us to focus on project by minimizing the amount of code needed for given task..


1) What is the current version of Codeigniter?

As on Sept 3, 2018 CodeIgniter 3.1.9 is the latest version of the framework.


2) How to check the version of CodeIgniter framework?

In system/core/CodeIgniter.php, check CI_VERSION constant value define(‘CI_VERSION’, ‘3.0.6’);


3) Explain helpers in CodeIgniter and how to load helper file?

As the name suggests, helpers help you with tasks.Each helper file is simply a collection of functions in a particular category.They are simple, procedural functions.Each helper function performs one specific task, with no dependence on other functions. CodeIgniter does not load Helper Files by default, so the first step in using a Helper is to load it. Once loaded, it becomes globally available in your controller and views. Helpers are typically stored in your system/helpers, or application/helpers directory Loading a helper file is quite simple using the following method: $this->load->helper('name'); Where name is the file name of the helper, without the .php file extension or the “helper” part.