Home  >  Article  >  PHP Framework  >  How to download and install the yii framework

How to download and install the yii framework

王林
王林Original
2020-02-18 15:57:012921browse

How to download and install the yii framework

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:

How to download and install the yii framework

Access requirements.php in the root directory in the browser to check whether the environment is suitable for using yii.

How to download and install the yii framework

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:

How to download and install the yii framework

How to download and install the yii framework

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

How to download and install the yii framework

Open the web.php file in it:

How to download and install the yii framework

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.

How to download and install the yii framework

For more programming-related content, please visit the Programming Introduction column 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn