CodeIgniter Interview Questions – Set 04

How can you extend a class in CodeIgniter? You have to build a file name application/core/MY_Input.php and declare your class with Class MY_Input extends CI_Input {}to extend the native input class in CodeIgniter. Explain controller in CodeIgniter. A controller is the intermediary between models and views to process the HTTP request and generates a web page. … Read more

CodeIgniter Interview Questions – Set 03

Explain the remapping method calls in CodeIgniter. The Second segment of URI determines which method is being called. If you want to override it, you can use _remap() method. The _remap method always get called even if URI is different. It overrides the URI. For Example: public function _remap($methodName) { if ($methodName === ‘a_method’) { … Read more

CodeIgniter Interview Questions – Set 02

How can you add or load a model in CodeIgniter? To load models in controller functions, use the following function: $this->load->model(‘ModelName’); If in case your model file is located in sub-directory of the model folder, then you have to mention the full path. For example, if your file location is application/controller/models/project/ModelName. Then, your file will … Read more

CodeIgniter Interview Questions – Set 01

What is the default controller in CodeIgniter? The file specified in the default controller loaded by default when no file name is mentioned in the URL. By default, it is welcome.php which is the first page to be seen after installing CodeIgniter. With URL localhost/codeigniter/ Welcome.php will be loaded as there is no file name … Read more

CodeIgniter Interview Questions

CodeIgniter Interview Questions – Set 04 CodeIgniter Interview Questions – Set 03 CodeIgniter Interview Questions – Set 02 CodeIgniter Interview Questions – Set 01