CodeIgniter Directory Structure

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:

  1. application
  2. system
  3. user_guide

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 guide. 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.

Anuj Kumar

I'm Anuj kumar a web developer with 4+ year experience .I write blogs in my free time. I love to learn new technologies and share with others. I founded PHPGurukul in September 2015. The main aim of this website to is provide php , jquery , mysql , phpoops and other web development tutorials. I am trying best effort to make PHPGurukul useful for every single moment spend on this website. If you think this website is useful to visit please share with your friend and buddies.

Recommended Tutorials for you

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *