directory Structure
Includes: Contains a library of functions commonly used by Drupal.
Misc: Used to store JavaScript, and various other icons and picture files available in the Drupal installation.
Modules: Contains all the core modules, one of which corresponds to a folder. Each module folder contains three basic files
Module name The file that is executed when the Install module is installed
description of module name. Info module
Module name . All handler functions for modules
Profiles:Drupal's installation profile directory, such as portals, personal blogs, e-commerce
Scripts: Contains a number of scripts that can be used for syntax checking, code cleansing, running Drupal from the command line , using cron to handle specific situations, and so on. It is not available in Drupal's request life cycle, and contains some shell and perl utility scripts.
Sites: A configuration file for a website, a third-party module (sites/all/modules), a theme (sites/all/themes), etc.
Sites/default/files:The directory where Drupal uploads files
Themes: Contains the Drupal template engine and the default theme. Other topics that you download or create cannot be placed here; it should be in sites/all/themes.
Cron.php: Used to perform recurring tasks, such as cleaning out outdated cache data, and calculating statistics.
index.php: The main entry for processing the request.
install.php: The main entrance of the Drupal installer.
update.php: After the Drupal version is upgraded, it is used to update the database.
Xmlrpc.php: Used to receive XML-RPC requests, if your site does not intend to receive XML-RPC requests, then you can delete them from it.
Robots.txt: It is the default implementation of the search engine crawler exclusion standard.
Execution process:
One. The boot process
Divided into9 Stages:
1. Initialize the configuration: This stage includes recording the start time of the page, initializing the global variable, reading the configuration information of the config file, initializingCookie Domain
AndSession Name
2. Early page Caching: include Cache processing files If the system is enabled for caching and implements page_cache_ The FastPath function, which has output and returns true, outputs the contents directly, the program exits 3. Initialize database: The Include database processes files and activates the database.
4. Permission validation: If there is no permission, the program exits
5. Initialize session: include Session processing files, registering session processing functions, and session_start ();
6. Post-page cache: If no cache is called, the module name of all modules _boot () function and send header, with cache read cache and call Module name _exit () function
7. Initialization language: Multi-language environment
8. Initialize the path: Find the module path 9. Final stage: include required function files, Register the exception handler, load all modules, and initialize the module (by calling module name _init function)
Ii. Processing Requests
Based on phase 8 of process one , the callback function is isolated from the database and executed, and the data is placed in the array for next stage processing
Iii. Thematic data
Based on the array of process two, and the theme that the site enables, the data is processed and displayed
The above describes the Drupal theme Drupal directory structure and request execution process, including the content of the Drupal theme, I hope to be interested in PHP tutorial friends helpful.