Home > PHP Framework > YII > body text

How to install the yii2.0 program?

angryTom
Release: 2020-02-05 17:59:02
Original
2252 people have browsed it

The Yii2.0 program can be installed using Composer. You only need to execute a simple command to install new extensions or update Yii. Below, we will take a look at the specific installation methods and steps.

How to install the yii2.0 program?

How to install the yii2.0 program?

(1) Install Composer

If you haven’t installed Composer yet, you can read this tutorial: How to install composer?

Recommended learning: yii tutorial

(2) Update Composer to the latest version

If you have already installed Composer please Make sure you are using the latest version. You can use the composer self-update command to update Composer to the latest version.

Note: During Yii installation, Composer needs to request a lot of information from the Github API. The number of requests depends on what your application depends on and may be greater than the Github API rate limit. If this limit is reached, Composer may ask you to provide your Github login credentials to obtain a Github API access token.

(3) Install Yii application template

After installing Composer, you can install Yii by running the following command under a web-accessible folder Application Template:

composer create-project --prefer-dist yiisoft/yii2-app-basic basic
Copy after login

This will install the latest stable version of the Yii application template in a directory called basic . You can choose a different directory name if needed.

If you want to install the latest version of Yii, you can use the following command

composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
Copy after login

Please note that the development version of Yii should not be used in production as it may Break your running code.

The above is the detailed content of How to install the yii2.0 program?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!