🔥 CodeIgniter
Beginner
What are Libraries in CodeIgniter?
Answer
Libraries in CodeIgniter (especially CI3) are classes that provide functionality beyond what helpers offer. In CI3, you load them with $this->load->library("email") then use $this->email->send(). Common built-in libraries: Email (send emails), Upload (file uploads), Session (session management), Encryption (encrypt/decrypt), Pagination, Form_validation, Image_lib (image manipulation), Cart (shopping cart), Cache. In CodeIgniter 4, the concept of libraries changed — functionality is now accessed through services: $email = \Config\Services::email() or service("email"). You can also create custom libraries in app/Libraries/.