1. First enter the yii official website to download
Download address:https://www.yiichina.com/download
2. Check the environment
After the download is completed, unzip it. The decompressed file directory is as follows:
Access requirements.php in the root directory in the browser to check whether the environment is suitable for using yii.
As long as there is no fail in the results column, it means that the environment is feasible; if so, adjust the environment.
(Related tutorials recommended:yii framework)
3. Install
to run the yii framework. The web/index.php in the file directory is yii The entry file of the framework, accessed in the browser triggers the installation of the Yii framework.
The access entry file displays the following page:
A configuration error was reported, cookieValidationKey must be configured with a secret key.
In the file directory, there is a folder config, which contains the framework configuration file
Open the web.php file in it:
You can see that the parameter cookieValidationKey prompted in the error is null. This parameter is used to prevent cookie attacks.
Fill in the value for this parameter, save the file, and refresh the browser's access entry file page. The appearance of congratulation indicates that the Yii framework installation is complete.
For more programming-related content, please visit theProgramming Introductioncolumn on the php Chinese website!
The above is the detailed content of How to download and install the yii framework. For more information, please follow other related articles on the PHP Chinese website!