1.

What is a helper in codeIgnitor.

Answer»

Helper in codeIgnitor helps you to ACCOMPLISH different TASKS.  Each helper file is a collection of functions which are aimed to solve a particular problem. Helpers are not written in an object-oriented way rather in a procedural way, independent of each other. 

Helpers can be of file helper, text helper, URL helper, form helper etc. 

  • To load helpers : $this->load->helper(‘helper_file_name’);  
  • To load multiple helpers : $this->load->helper(  array('helper1', 'helper2', 'helper3'));  
  • To auto load html helpers : ADD in autoload.php $autoload['helper'] = array('html');  

To use the helpers we need to load it. CodeIgnitor will first look into application/helpers directory for the same and if it’s not found there then will look into system/helpers directory.



Discussion

No Comment Found