RE: what helpers in CodeIgniter are and how you can load a helper file?

what helpers in CodeIgniter are and how you can load a helper file?

dip Team Leader Asked on June 7, 2018 in CODEIGNITER.
Add Comment
1 Answers

CodeIgniter does not load Helper Files naturally, so the initial phase in utilizing a Helper is to load it. When loaded, it turns out to be comprehensively accessible in your controller and views. Helpers are typically stored in your system/helpers, or application/helpers directory.

Loading a Helper

Loading a helper file is quite simple using the following method:

$this->load->helper('helpername');

 

 

Where helpername is the file name of the helper, without the .php file extension or the “helper” part.

For example:

To load the URL Helper file, which is named user_helper.php, you should  add the below code:

$this->load->helper('user');

 

 

Team Leader Answered on November 20, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.