Home >PHP Framework >YII >yii2 running process
yii2 operation process is as follows:
1. The user initiates a request to the entry script web/index.php.
2. The entry script loads the application configuration and creates an application instance to handle the request.
3. The application resolves the requested route through the request component.
4. The application creates a controller instance to handle the request.
5. The controller creates an action instance and executes the filter for the operation.
(Related tutorial recommendation: yii framework)
6. If any filter returns failure, the action is cancelled.
7. If all filters pass, the action will be executed.
8. The action will load a data model, perhaps from a database.
9. The action will render a view and provide the data model to it.
10. The rendering result is returned to the response component.
11. The response component sends the rendering result to the user's browser.
For more programming related content, please pay attention to the Programming Introduction column on the php Chinese website!
The above is the detailed content of yii2 running process. For more information, please follow other related articles on the PHP Chinese website!