2012-09-17 52 views
0

這是我理解Codeigniter目錄結構的操作。我正在使用Codeigniter 2.1.2。我誤解了每個目錄的使用嗎?任何我忘記的東西?我是否正確理解Codeingiter目錄結構?

-+ /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 

謝謝!

回答

5

幾乎,你對目錄結構的基本理解是正確的。也就是說,你應該避免修改核心CodeIgniter類,而應該根據需要擴展它們。

助手不只是'包含你自己的功能'。助手既可以是你的函數,也可以是內置的,但是這些是核心MVC集合之外的類/函數,它們「幫助」完成某些事情,例如形式建設或其他日常任務。

+0

輝煌,謝謝:) – GhostInTheSecureShell