In the previous tutorial we learned about basics of Codeigniter and how to install Codeigniter . In this tutorial we will learned about codeigniter directory structure.
Codeigniter file structure contain three main folders:
and also contain two files index.php and license.txt.
index.php default file of the codeigniter and license.txt contain the licence of the Codeigniter.
user_guide folder –
user-guide contains the entire codeigniter user. You can view on your local system by visiting this url http://localhost/codeigniterdirectory/user_guide/ and you can view up-to-date copy on CI user_guide on the CI official website on this link https://www.codeigniter.com/user_guide/.
system folder –
System folder contain all inner work of codeigniter .This folder contain the core functionality and all built-in libraries of CI .
application folder –
Application is the main folder of CI. The application folder contain the application file we are building.
This folder contain application MVC(Model, View, Controller) and other code(like helper and class extensions).
cache folder – In this folder all cached pages for our application.
config folder – Application configuration file where we can set configuration of our application(like base url).
controller folder – This folder contain our class file developed for our application.
core folder – Contain base file of application.
error folder – In this we will place application specific error logs.
helper folder – This folder contain all includes file of our application.
hooks folder- Hooks in CodeIgniter helps you to modify the core functionality of the framework without modifying the core files. Hooks folder contains all the files which has code related to Hooks.
language folder – In this folder we will place language macros and contants
libraries folder – In this folder we will place own developed libraries.
logs folder – In this we will place application error, access and other logs.
models folder – This folder contain database fetching logics. Model deals with back-end operations.
third_party – If third party plugins used in our application will be placed in this folder.
view folder – This folder contain our HTML template. View deals with fronted operations.