Codeigniter is the best Frame Work to build Applications Easily. in this Chapter you Will learn Structure of Codeigniter Application.
in the Below Flow Chat you Will Find the folder Structure
- the Aboe Flow chart, whenever a request comes to CodeIgniter, first it will go to index.php page.
- In the second step, Routing conforms whether to pass the request to Caching or to pass the request to for Security check.
- If the requested page is already in Caching, then Routing will then it request to response will go back to the user.
- In case the request page does not exist in the Caching, then Routing, then the requested page to Security checks.
- Before passing the request to Application Controller, the Security of the submitted data is checked. After the Security check is done, the Application Controller loads all the necessary Models, Libraries, Helpers, Plugins and Scripts and pass it onto View.
- The View will provide the page with available data and pass that on for Caching, to process this page quickly for future requests.
Directory Structure of Codeigniter folder
Find the Below Figure for codeigniter Folder Structure
CodeIgniter is divided into three folders:
Application Folder Contains Some Sub Folders like cache,config,controllers,core,helpers, hooks,libraries,logs,language,models,third party,views. Within this application folder there exist several other folders as explained below:
- Cache - The Cache folder contains all the cached pages of your application. These cached pages would increase the overall speed of accessing the pages.
- Config - The Config folder contains various files to configure the application. With the help of config.php file, you can configure the application. Using database.php file, you can configure the database of your application.
- Controllers – This folder contains the controllers of your application. It is the basic part of your application.
- Core - This folder contains the base class of your application.
- Helpers – The helper class of your application can be put in this folder.
- Hooks – With the help of files in this folder you can tap into and modify the inner workings of the framework without hacking the core files.
- Libraries – This folder contains the files of the library developed for your application.
- Logs – This folder contains the files related to the log of the system.
- Language –This folder contains language related files.
- Models – The database login is placed in this file.
- Third_Party – The plugins can be placed in this folder for using it in your application.
- Views – The HTML files of your application can be placed here.
The System folder contains the CodeIgniter core codes, libraries, helpers and other files, which helps make the coding easy. The libraries and helpers are loaded and used for web application development. This folder contains all the CodeIgniter code of consequence again organized into various folders mentioned as below:
- Core – The Core folder contains CodeIgniter core class. Nothing should be modified here. Since all your work will take place in the application folder, if you intend you extend the CodeIgniter core you will have to do it with hooks, which itself exist in the application folder.
- Database – This folder contains the database drivers and database utilities.
- Fonts – This folder contains the font related information and the utilities.
- Helpers – The standard CodeIgniter helpers such as data, cookie, and URL helpers exist in this folder.
- Language –Contains language related files. This can be ignored for now.
- Libraries – The folder contains standard CodeIgniter libraries such as e-mail, calendars, file uploads etc. You can create your own libraries, extend and even replace standard ones. But those will be saved in the application/ libraries directory to keep them separate from the standard CodeIgniter libraries in this particular folder.