- Programming with CodeIgniterMVC
- Eli Orr Yehuda Zadik
- 534字
- 2021-08-06 16:48:03
Folders overview
The root folder contains the index.php
file, which handles all the URI requests. The index.php
file will process them with the CI core, and apply our application controllers using the models, libraries, and helpers loaded by the controllers and rendered views, license.txt
, which is the CI's license file. .htaccess
is used for configuring the CI routing and removing index.php
from the URL. JavaScript, CSS, and HTML is incorporated into the rendered PHP output and their usage is elaborated in Chapter 7, Views.
Let's review the folders and their content application.
The application directory folder is the root directory of our main activity project coding zone. This is the heart of the CI-developed application project.
Mandatory components
Let's take a look at the mandatory components.
application/config
: This folder contains all the CI application configuration files, which are covered in Chapter 2, Configurations and Naming Conventions.application/controllers
: This folder contains all the application controllers in the CI application project. A controller, as mentioned in the Preface, is a component in the MVC-design architecture that handles the request by the user and presents the data shown to the user. A controller in CI is a class extending a base class of the CI controller. The class methods can be executed or called with a proper URI. The naming conventions related to the controller definition and usage will be covered in Chapter 2, Configurations and Naming Conventions.application/views
: This folder contains all the view files. A view is the HTML content executed by the user browser that presents and interacts with the user. A view can be a webpage or an RSS page.
The following components are not mandatory but are highly recommended:
application/models
: This folder contains all the project model files. A model is the component of the MVC design architecture, which handles the data stored in the database. A model in CI is a PHP class that is designed to work with the information in the database. Chapter 6, Models, will elaborate on the CI models concept, definition, and usage with several usage examples.application/helpers
: This folder contains all the additional helper files to the CI helpers. They can be third-party or created by the developer. A helper file is a collection of independent procedural functions in a particular category. Each helper function performs one specific task, with no dependence on other functions. Chapter 5, Helpers, will elaborate on the CI helpers concept, definition, and usage with several usage examples.application/libraries
: This folder contains all the libraries of the CI application project created by the developer. A CI library is technically a PHP class. The scope of the library can be any project resource, such as helpers, models, controllers, and views. For example, a library can provide Facebook library API services to simplify the application code for Facebook integration. Chapter 4, Libraries, will elaborate on the CI libraries concept, definition, and usage with several usage examples.system
: This is the root of the CodeIgniter core directory. The system folder contains important system components in the subfolders, such as core, database, helpers (built-in system helpers), and libraries (built-in system libraries).Tip
Do not edit any of these files! Upgrading is much easier if we don't.
- SQL Server 從入門到項目實踐(超值版)
- OpenCV for Secret Agents
- 跟小海龜學Python
- Python神經網絡項目實戰
- HTML5+CSS3+JavaScript Web開發案例教程(在線實訓版)
- MySQL數據庫管理與開發實踐教程 (清華電腦學堂)
- R Deep Learning Cookbook
- ElasticSearch Cookbook(Second Edition)
- Java網絡編程實戰
- C# and .NET Core Test Driven Development
- jQuery for Designers Beginner's Guide Second Edition
- Photoshop智能手機APP界面設計
- 現代C++語言核心特性解析
- Implementing Domain:Specific Languages with Xtext and Xtend
- 趣學數據結構