×

Structure of Codeigniter

The File structure of CodeIgniter is divided into three parts:

  1. Application
  2. System
  3. user_guide
Structure of Codeigniter

Application -:

As the name represents Application, which contains all the main parts of the project like a controller, libraries, view, models, and others. Also, it is that place where you will develop your web application. Here we will discuss some components used in the Application folder.

Structure of Codeigniter2

Cache – This folder contains all the web pages records which you have used in your web application. The cache pages also used to increase web performance and faster to access the web pages in the web application.

Config – The Config folder contains many files that are used to configure the web application. Like autoload.php file which is used to load all libraries, helpers, you can also define your custom files, so you don’t require to call the records or method again and again in your web application. In the database.php file, you can configure your database table with the application. And in routes.php file, you can define the controller’s files and their actions in the application.

Controllers – A controller is used to control the flow of the web application. It means, this can handle all the server-side functionalities. If the controller fails, then all the associated features related to the controller are also failed.

Note: The name of the controller should be in capital letters. Example Main.php file should not be written as main.php.

Core – A CodeIgniter contains some core class that is used as a base class of the application. So, you don’t require any changes in the core files.

Helpers – This helper folder is used to load the functions in the CodeIgniter. Like

load->helper (‘date’); This function will provide the date functionality in the application. Similarly, you can add web files like as html, CSS, javascript, form function.

Hooks- This folder contains some files which are used to tap and update the internal working of the web framework without harming the core files of the application.

Libraries - This folder contains the language-related library files of your application.

Logs – This folder contains some files for checking the status of the CodeIgniter application. Suppose if your CodeIgniter application is facing some error or exception messages and you want to know what they are, then you can check in the logs folder.

Models – Models are used to handle database queries. By use of a model, we can perform CRUD (Create, Read, Update, and Delete) operation in the web application.

Third_party – This folder contains the plugins which are used in the web application for adding the additional functionality in the CodeIgniter application.

View – It contains all the HTML files for showing the output on the browser. A view is used to display a message or information to the user that they want to see.

System

A System folder in CodeIgniter application is used to contain the core codes, libraries, helpers, and other files, which helps to create the coding easy for the developers.

Core – All the core files that are used to create a framework will be stored in this folder. And if you want to enhance the functionality of the web application, then you can create a custom core files in the application folder.

Database – A database folder contains all the database files like drivers, cache, query_builder, and database utilities.

Fonts – This folder contains all the fonts related information and other utilities.

Helpers – It contains some CodeIgniter helpers, which are useful to perform various operations such as cookie, date, email, form, etc.

Language- A CodeIgniter supports multi language web application.

Libraries – A library folder consists of many supported files such as JavaScript, calendar, email, encryption, parser, file upload, etc. and that will be stored in the “application/libraries.”

Structure of Codeigniter3

User_guide

A CodeIgniter provides a basic user_guide to their user/developer for a better understanding and development of the web application. It is an offline user manual guide that shows the step by step learning of the CodeIgniter framework. This manual describes many libraries, function, helpers, and classes which will be used in the CodeIgniter web application.

Besides these three folders (Application, System, and User_Guide), there is another file “index.php.” In this file, you can define the application environment and error level. Also, you can set the system and application folder name. If you are a beginner, then we strongly recommend you, please don’t modify this file.


Related Topics

CodeIgniter Calendaring Library

The calendar library contains various functions that are used to create a dynamic calendar. It also enables you to pass the data to calendar cells and 100% control over the calendar design. Load...

7 minutes read.

CodeIgniter URI Class

URI Class The CodeIgniter contains a URI class that is used to retrieve information from URI strings. It also provides suitability to get information from the re-routed segments. The system automatically initializes this...

6 minutes read.

Form Validation Library Codeigniter

Form Validation Library The Codeigniter provides a form validation library that contains predefined rules to validate the form fields. It also helps in optimizing the form validation code, which reduces the effort and time...

31 minutes read.

CodeIgniter Input Class

Input Class The CodeIgniter framework provides an input class that includes various input functions to pre-process global input data for protection; furthermore, it also provides some helper functions to obtain input data. This...

11 minutes read.

CodeIgniter Number helper

The number helper file contains some predefined function that deals with numeric data to display numbers in bytes format. Load a Number Helper You must load a number helper file in the controller to perform...

3 minutes read.

Insert data to the database CodeIgniter

After successfully creating a database connection with the CodeIgniter application, we will now understand how we can insert records into the database. To insert a record into a database table, Codeigniter provides...

8 minutes read.

CodeIgniter URL Helper

The helper file contains some predefined functions that are used to work with URL, such as generate the current file path, transfer control, redirect, create a link, etc. Load the URL Helper Before using...

7 minutes read.

CodeIgniter Security Helper

A Security helper file contains some predefined functions that are used to protect application from unauthorized access. Loading the Helper The following syntax is used to load the security helper in the CodeIgniter application. Syntax $this-> load->...

4 minutes read.

Structure of Codeigniter

The File structure of CodeIgniter is divided into three parts: ApplicationSystemuser_guide Application -: As the name represents Application, which contains all the main parts of the project like a controller, libraries, view, models, and others....

3 minutes read.

Codeigniter Session Library

Session Library The session is an essential part of any application. It contains various functions to manage the users' status and track their activity while browsing on the site. For example,...

13 minutes read.

Download Helper Codeigniter

Download Helper Codeigniter: The download helper function is used to download data from the server to your computer. The data can be any format like text, jpg, mp3, mp4, etc. Loading...

2 minutes read.

CodeIgniter Tutorial

What is CodeIgniter? CodeIgniter is an open-source framework for developing a dynamic web application with the use of PHP. It uses the MVC framework to develop the project, which is much...

3 minutes read.

CodeIgniter Controller

As its name suggest that it is a Controller that controls the web application, and it works as an intermediary between the Models and the View. A controller takes requests from the user...

3 minutes read.

CodeIgniter HTML Helper

The HTML helper function is used in CodeIgniter to provide various functionality, such as headings, images, links, list tags, etc. Loading the HTML Helper Before using the html helper function, you must load the...

7 minutes read.

CodeIgniter Helpers

The Helpers (functions) are stored in the Helper file. It helps CodeIgniter to perform different tasks. The helper file is the collection of many functions that is used to perform specific task. It...

3 minutes read.

CodeIgniter User Agent Class

User Agent Class The CodeIgniter provides a user agent class that helps to identify and collect information about the browser, mobile devices, or robots visiting your site. Besides this, it is also used...

4 minutes read.

CodeIgniter Creating Library

As we know, CodeIgniter has a large collection of library functions that are stored in the system/libraries folder. CodeIgniter also provides some additional functionality in library files. For example, if you want to...

3 minutes read.

CodeIgniter Security Class

Security Class The security class provides various function that helps to create a secure application and process input data securely to the application. This class is preloaded in the CodeIgniter application, so you...

4 minutes read.

CodeIgniter Encrypt Class

The Codeigniter provides an encrypt class used to protect confidential data stored on computer systems or data transmitted over a network. It provides two-way data encryption techniques such as Mcrypt PHP extension and...

4 minutes read.

CodeIgniter Libraries

The library is an important part of the CodeIgniter framework. It has a large collection of libraries files that are used to increase the performance of an application. By default, all CodeIgniter libraries...

4 minutes read.