Directory Structure

2018-07-13 09:30:55
tengfei
4463
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.

Write a Comment
Comment will be posted after it is reviewed.