CodeIgniter Directory Structure

This article will give you a detailed description on the codeigniter folder structure which will help you to know the theoretical concepts when developing.



Once you download the codeigniter framework , you can extract it and save it in your project folder. Now the folder structure will be shown as follows.


In here we basically focus on the three main folders (application,system and user_guide) and the index.php file.


index.php

index.php is the php file where the request is sent to the controller which comes from the web browser.

user guide folder

User guide folder is considered to be the offline version of documentation. Following diagram contains the CodeIgniter User guide online documentation


user_guide folder contains same information which is there in the online documentation



system folder

All the CodeIgniter functionalities and database connections are stored in system folder. It basically contain all the CodeIgniter libraries. Strictly make sure not to make any changes to this folder.



  • core folder - all the libraries
  • database - Database related files
  • helpers - all the helpers

applications folder

This is the main folder which is used to design the web applications. Inner folder structure of this folder is given below



Mostly used folders are the config,controllers,models,views and helpers.Also you can use libraries to create your own libraries.

config folder




  1. autoload.php - To auto load helpers,libraries,drivers when the website loads
  2. database.php - To build the database connection
  3. routesphp - To route the web sites

controller folder

Requests made from the browsers are directed to the controllers and then to the model. Model directs the fetched data to load the view.


model folder 

To fetch the data and send to the view.


view folder

All the views should be created in this folder.








Comments

Popular posts from this blog

Working with Buttons in Android Studio

MongoDB Connections in MEAN Stack

Java Part 2 :How to Install Java