- 1 Introduction
- 1.1 About zentaoPHP
- 1.2 Features
- 1.3 License
- 2 Installation
- 2.1 System Requirement
- 2.2 Install zentaoPHP
- 3 Quick Start
- 3.1 Echo Hello World!
- 3.2 Use MVC to echo Hello World!
- 3.3 Example: Deploy the blog built in zentaoPHP
- 4 Basics
- 4.1 Basic Concepts
- 4.2 Request Types
- 4.3 Create Links
- 4.4 Class: HTML, JS, and CSS
- 5 Advanced
- 5.1 Directory Structure
- 5.2 DAO
- 5.3 Pager Solutions
- 5.4 Data Validation
Directory Structure
- 2018-07-13 09:30:55
- tengfei
- 6016
- Last edited by tengfei on 2019-09-16 14:13:30
Directory structure is important for a framework. Let's see the directory structure of zentaoPHP.
1. Root Directory
-
config: configuration files, including config.php and my.php
-
db: blog.sql required in demo application
-
framework: core files of the framework
-
js: js script files
-
lib: common class files
-
module: module directory; each module has a directory
-
theme: theme files, including CSS files and image files
-
.htaccess: URL rewrite rule files in Apache
-
favicon.ico: small logo files
- index.php: entry program
2. Module Directory
-
config.php configuration files for the module, and global configuration files
lang language files for the module. zh-cn is simplified Chinese, zh-tw is traditional Chinese and en is English.
control.php control files for the module
model.php service logic files for the module
- view view files for each page, e.g. index.html.php is the template file of the index method
Note:
common is to store common files for an application, such as lang, template, and model. For example, lang/en.php is for common language files, header.html.php is common header files for templates, footer.html.php is common footer files for templates, error.html.php is for common error message files.