Reputation: 1010
This is how I understand the Codeigniter directory structure to operate. I am using Codeigniter 2.1.2. Have I misunderstood the use of each directory? Anything I've forgotten?
-+ /application/
|
|-+ /cache/ Used for caching pages if it is enabled
|-+ /config/ Contains the configuration files for this project
|-+ /controllers/ All of your controllers are saved here
|-+ /core/ Used for modifying the core Codeigniter classes
|-+ /errors/ Handles your errors and their output
|-+ /helpers/ Contains your own functions
|-+ /hooks/ Used for running code at the certain points in the routing process
|-+ /language/ Occasionally used for translating parts of your project into different languages
|-+ /libraries/ Contains your own classes
|-+ /logs/ When you log any sort of notice it is saved inside a file in here
|-+ /models/ All of your models are saved here
|-+ /third_party/ Basically another name for plugins which go here
|-+ /views/ Your views are saved here normally organised by controller inside a new directory
-+ system/ Never go in here instead use the core directory inside /application/
-+ index.php The front controller for your project
Thanks!
Upvotes: 0
Views: 158
Reputation: 1384
Almost, your basic understanding of the directory structure is correct. That said, you should avoid modifying the core CodeIgniter classes and should instead extend them as necessary.
Helpers is not just 'contains your own functions'. Helpers can either be your functions or built in ones, but these are classes/functions outside the core MVC set that 'help' get certain things done, e.g. form building or other routine tasks.
Upvotes: 5