Sunday, August 19, 2012

Codeigniter Directory Structure

Now that you have CodeIgniter downloaded and unzipped, take a minute to look at the file structure. Below illustrates the initial folder structure you ’ ll see.

You can see three folders and two files in the codeigniter folder. The three folders are application, system and Codeigniter user guide and the files are index.php and license.txt.Below is the detailed description about the directories.

The application Folder— The application folder contains the application you ’ re building. Basically, this
folder contains your models, views, controllers, and other code (like helpers and class
extensions). In other words, this folder is where you will work for the project development.

cache — The cache folder contains all cached pages for your application. In Chapter 9 , you learn
more about caching and how to turn your super - speedy development application into a
blazingly fast live application.
Config— The Know more about config folderfolder is the area where you set the configuration for your application.
Controllers— In this folder you will place your class files developed for your application
core— In this folder you will place your base class files of your application
errors— In this folder you will place your application specific error logs
helpers— In this folder you will place the include files use full for your application
hooks— In this folder you will place the support files use full for your application
language— In this folder you will place language  macros/ define constants.
libraries— In this folder you will place your own developed libraries useful for your application
logs — The logs folder is the folder CodeIgniter uses to write error and other logs to.
models— In this folder you will place your data base fetching logic in
thirdparty— In this folder you can place any plugins used for your application
views— Most of your work will be in this folder, you will place your html template files. 

The system/ Folder
The system/ folder is where all the action happens. This folder contains all the CodeIgniter code of
consequence, organized into various folders:

core — The core folder is where CodeIgniter ’ s core classes live. You have almost no
reason to go in here. All of your work will occur in the application folder. Even if your intent is
to extend the CodeIgniter core, you would do it with hooks, and hooks live in the application
folder.
database — The database folder contains core database drivers and other database utilities. Again,
there ’ s no good reason for you to be in this folder.
fonts — The fonts folder contains font - related information and utilities. Again, there ’ s no reason
to spend any time here.
helpers — The helpers folder contains standard CodeIgniter helpers (such as date, cookie, and
URL helpers). You ’ ll make frequent use of helpers in your CodeIgniter career and can even
extend helpers thanks to improvements introduced in CodeIgniter version 1.6.
language — The language folder contains language files. You can ignore it for now.
libraries — The libraries folder contains standard CodeIgniter libraries (to help you with e - mail,
calendars, file uploads, and more). You can create your own libraries or 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 saved in this particular folder.

For more info visit codeigniter site at www.codeigniter.com

25 comments:

  1. Nice article for beginners to learn the codeigniter architecture.

    ReplyDelete
  2. Thank You. I will keep on posting

    ReplyDelete
  3. Thanks for this post...

    ReplyDelete
  4. Hi, Thanks for publish the basic folder structure and explanation... Could you please share me the zend certification preparation materials

    ReplyDelete
  5. Yes, Useful things to understand basics of CI structure.

    ReplyDelete
  6. Nice blog...Very useful information is providing by ur blog. find Great beginning php tutorials Very clear and helpful for beginners.

    ReplyDelete
  7. Hi, Thanks for the blog. I am new in codeigniter, rather any PHP frameworks. I am looking for a folder structure which is sorted module wise. that is if I have 3 modules viz. login, register, play then folder should be login, register, play and each of them containing controllers, models, views so that any module becomes a plug and play.. Is there any framework in PHP satisfying this need? Or with codeigniter, can I achieve the same?
    Thanks

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Thanks for sharing it !!!
    Really awesome blog. Keep blogging and updating.
    Offshore software development company India

    ReplyDelete
  10. Interesting blog. It would be great if you can provide more details about it. Thanks you
    professional web development company

    ReplyDelete
  11. Learn a lot more things from this Its really great platform for any beginner to learn a lot more things about PHP.

    ReplyDelete
  12. Super information about PHP
    Thanks for helping me in improving of knowledge on PHP
    Please do sharing on...

    ReplyDelete

  13. Nice and good post. It is very useful for me. Thanks for sharing your valuable information.
    PHP Training
    PHP Course
    PHP Institute

    ReplyDelete
  14. does codeignitor 2.x and 3.x have same directory structures?

    ReplyDelete
  15. Thanks for sharing such a nice information with us on Code Igniter and MVC. Very useful lines and to the point.Appreciate your skill , keep sharing such wonderful information.
    Code Igniter Interview Questions Answers
    Code Igniter Advanced Interview Questions Answers
    Code Igniter Basic Interview Questions Answers
    Hooks in CodeIgniter

    ReplyDelete
  16. "I have learned both of them at University during the same year, and made the same application in both of them to clarify my mind.
    Developing in https://www.sofvare.com/Python took way less, and the code was by far more readable. The only reason for using Java is if you need that extra performance.Angular js devlopment

    ReplyDelete
  17. It’s an attractive article for us which you've provided here. This is often a superb resource to strengthen knowledge about it. Thank you. PHP Training in delhi

    ReplyDelete
  18. I am truly impressed by the tiny print which you've provided regarding signs. It is a stimulating article on behalf of me as well as for others. Thanks for sharing such articles here. PHP Training in delhi

    ReplyDelete
  19. Titanium Athletics - Sports, Fitness, Darts, Table Tennis
    The Titanium Sports apple watch stainless steel vs titanium is a team of titanium alloy nier replicant professional athletes created in 1983 in micro touch titanium trimmer the United States. They have titanium cerakote since titanium ore grown to become the best team

    ReplyDelete