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 (Introduction)

Codeigniter is an open-source PHP framework that is widely used for creating small/large scale web applications. It is based on the most popular design architecture called MVC. It comes with built-in reusable libraries which enhances the efficiency of a developer while developing an application. MVC design architecture There are many design architecture in programming language and the most popular is MVC. If your application is based on MVC, that simply means, your application has three design layers.  M => Model V  => View C => Controller Model => In a model, we do all the database related operations like fetch or select the data from a database, update a record in the database or delete a record from the database.     View => In a view, we write all the stuff like HTML, CSS, and Jquery. So, we can say the frontend we see in a browser is a view. Controller => Well, In the controller, we write our business logic, it works as...

Codeigniter tutorial in Hindi (Core classes)

"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 core classes of the Codeigniter framework, I also explained how you can extend the Controller core class. Here are the steps you need to follow to extend the core class. Step 1) Create a file in the application/core folder and save something like this "MY_Controller.php". Step 2) Now create a class MY_Controller and extend with CI_Controller as we are extending CI_Controller, now you will get all parent properties because of inheritance. Step 3) Now you can create your methods inside this class.

Simple Codeigniter 4 CRUD Application in Hindi (Introduction & Installation) - Part 1

============================================== Simple Codeigniter 4 CRUD Application in Hindi ============================================== Server Requirements: ------------------------------------ PHP version 7.2 or newer is required, with the *intl* extension and *mbstring* extension installed. Currently supported databases are: ------------------------------------ MySQL (5.1+) via the MySQLi driver PostgreSQL via the Postgre driver SQLite3 via the SQLite3 driver https://codeigniter4.github.io/userguide/intro/requirements.html ------------------------------------- Installation ------------------------------------- 0) You need to install Composer first, if you already installed you can skip this step. 1) Open your working folder, if you are using xammpp you need to open htdocs directory. 2) Now open CMD and go to htdocs folder, and run the composer command given below. composer create-project codeigniter4/appstarter ci4_crud Note: make sure *intl* and *mbstring...