Skip to main content

Codeigniter tutorial in Hindi (Directory Structure)



Codeigniter Directory Structure
If you want to learn a framework you first have to understand the directory structure of a framework, so I've attached a screenshot above.   

When you'll download the footprint of the Codeigniter framework from the Codeigniter official website, you will see the directory structure as shown in the above image. Because it has a very small footprint something around 2.6 MB, it is a very fast and stable framework.

If you see the screenshot, you will see 4 folders. And each folder has some subdirectories. Now let me explain these directories.

application:- This is the folder where we mostly write our business logic. It consists of models, views, controllers, config, and other important stuff. Overall, all your code will be placed under the application directory.     

system:- This is the folder where you will see all the core files of the Codeigniter framework. It is highly advisable to don't make changes here.

user_guide:- This is offline documentation of the CodeIgniter framework. In user_guide, you will see well-explained documentation about classes, libraries, helpers, configuration, etc. So, while learning the Codeigniter framework, I'd suggest you please go through the documentation once. 

index.php:- And this the most important file and it is the entry point of the Codeigniter framework. 

Now, let's go deeper inside the application folder

In the application folder, you will get the following subdirectories.
  • cache: Here we store cached files.
  • config: This is the folder where we save our configuration.
  • controller: We define all our controllers inside this folder. 
  • core: Inside this folder, we extend our Codeigniter core classes.
  • helpers: Inside this folder, we can define our custom helpers or we can also extend existing helpers.
  • hooks: Inside this folder, we define our custom hooks
  • language: If our web application is multilingual, then we put our language files inside this folder
  • libraries: Inside this folder, we can define our custom libraries or we can also extend existing libraries.
  • logs: We keep our log files inside this folder.
  • models: Inside this folder, we define all our models.
  • third_party: Inside this folder, we place all the third party libraries or packages.
  • views: Inside this folder, we define all our views.

Now, let's go deeper inside the system folder

  • core: This is the folder where you'll see core classes of Codeigniter framework which runs the Codeigniter framework. It is highly advisable do not change files inside this folder. 
  • database: This folder contains database drivers and all the database related files.
  • fonts: This folder contains all the font-related information.   
  • helpers: This folder contains built-in helpers that we can use in our project.
  • language: This folder contains all the language file which are used by the Codeigniter framework. 
  • libraries: This folder contains built-in libraries that we can use in our project.


Comments

Popular posts from this blog

Codeigniter tutorial in Hindi ( get_instance() )

"Codeigniter tutorial for beginners step by step in Hindi 2020" is a video series for beginners who want to learn the Codeigniter framework from scratch. This Codeigniter tutorial video series is perfect for beginners who want to learn from scratch, during the video series I will cover most of the topics of Codeigniter framework. Topic:- In this video, I have explained about get_insance() method. In Codeigniter custom libraries or custom helpers, you will not be able to access Codeigniter resources using $this super object. For this situation, we use &get_insance() and it returns a reference of the super object Syntax $CI = & get_insance(); Now we are able to access Codeigniter resources the way given below:- $CI→load→library(''yourLibraryName'); $CI→yourLibraryName→yourMethod()

Codeigniter tutorial in Hindi (Helpers)

"Codeigniter tutorial for beginners step by step in Hindi 2020" is a video series for beginners who want to learn the Codeigniter framework from scratch. This Codeigniter tutorial video series is perfect for beginners who want to learn from scratch, during the video series I will cover most of the topics of Codeigniter framework. Topic:- Codeigniter has two types of facilities that can help in the development of the application these are Libraries and Helpers. All the CodeIgniter libraries and helpers are placed in the system folder.

Codeigniter tutorial in Hindi (Model #2)

"Codeigniter tutorial for beginners step by step in Hindi 2020" is a video series for beginners who want to learn the Codeigniter framework from scratch.  This Codeigniter tutorial video series is perfect for beginners who want to learn from scratch, during the video series I will cover most of the topics of Codeigniter framework.   Topic:-  This video is part 2 of my previous Codeigniter model video, in this video, I have explained how you can use query builder in Codeigniter and fetch records from the database using a Model.