CodeIgniter is an Application Development Framework to build websites using PHP. It is used to minimize the code while developing an application and developed as much fast. The folder structure is an important part of CodeIgniter. It is important to understand the file structure in CodeIgniter to develop successful applications.
When you open the directory structure of CodeIgniter there will main three folders which are given below:
- Application
- System
- User_guide
So, now we will look into all the parts.
Folder Structure:
Application: The application folder is where all the code of the application we are developing is stored. It consists serval other folders.
- Cache: In this folder, all the cache pages of your application will be stored. This helps to increase the speed of your page access.
- Config: In this folder, all the configuration files are stored. Using database.php users can configure databases of applications and config.php files we set our base-url etc.
- Controllers: In this folder, it contains the control of our application and all server-side functionalities.
- Core: All the base classes of your application will be stored here.
- Helpers: This will help you in creating your application.
- Hooks: This will help you to modify the inner working of your framework.
- Language: You can use the language according to your need in the project.
- Logs: Here all the files related to the log will store and sometimes if you are getting errors and you are not getting the message then you can look into their explanation.
- Models: All the database logins will be stored here and the controller will request them here and then it can use them.
- Third_party: All the third-party plugins will be stored here to use in the application.
- View: Here your all HTML files related to the application will be stored.
System: All the files related to coding, libraries, and other files will be stored here which will help you make the coding easy.
This folder also contains various folders which are explained below:
- Core: It consists of all the CodeIgniter’s core classes. Please do not try to make any change here.
- Database: All the drivers and utilities regarding the database will store here.
- Fonts: All the information and utilities regarding fonts are stored here.
- Helpers: It consists of all helpers-related data such as date, cookie etc.
- Languages: All language-related files stored here CodeIgniter supports multilingual web applications.
- Libraries: Here libraries will be stored which help you in creating applications easily like file upload, emails, calendars.
User_guide: It works as an offline CodeIgniter guide which helps you to learn the basic functions of various libraries of CodeIgniter. You should go through this to learn about CodeIgniter. It consists of an index.php file that contains important things to set environment and error level. You should not touch this file if you do not have knowledge.
Advantages:
- Error Handling
- Customizability
- Security
- User-Friendly Interface
- MVC Based System
Disadvantages:
- Lack exhaustive libraries
- Lack of modern namespace, autoloader use