CodeIgniter For Project : Lesson 105 - Helper and Library
1. CodeIgniter For ProjectLesson 105 : Helper and Library
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
2. Helper
“Helpers, as the name suggests, help you with tasks. Each
helper file is simply a collection of functions in a particular
category”
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
3. Helper load code
• $this->load->helper([helper name]);
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
You can load helper on constructor and function in Controller
4. Helper frequently used
• url : URL helper utility
• form : Form helper utility
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
5. url : URL helper utility
• site_url() : Get current url your website.
• base_url() : Get current base path.
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
8. form : Form helper utility
• form_open() : Auto form open generate
• form_close() : Auto form close generate
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
9. form : Form helper utility
• form_open()
• form_close()
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
11. Library load code
• $this->load->library([library name]);
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
You can load library on constructor and function in Controller
15. input : CodeIgniter input library
(autoload)
• $this->input->post() : Get value from post method
• $this->input->get() : Get value from get method
• $this->input->cookie() : Get value from cookie
• $this->input->server() : Get value from server variable
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com
18. form_validation : CodeIgniter form
validate library
• $this->form_validation->set_rules() : Set form validate rule
• $this->form_validation->run() : Begin validation from rules
• validation_errors() : Show error if validation not pass
Weerayut Hongsa : Network Engineer / Software Developer
Major Kantana Broadcasting Co., Ltd
https://kusumotolab.com