Before installing the Yii2.0 framework, you must first install the PHP web environment on the Windows system. This is a prerequisite for PHP development. When installing the PHP web environment on Windows, you can choose some integrated environments, which are very convenient to install with one click, such as phpstudy.
Confirm whether the composer tool is installed, win R, cmd to enter the command line, enter composer to check whether it is installed. If it is not installed, please install the composer tool first.
In the PHP web environment, create the installation directory of the yii2.0 framework. I use the phpstudy integrated environment, create the yii2 directory in the phpstudy\WWW\ directory, and later install the basic and advanced versions of yii2 in this directory.
win R, enter cmd to enter the Windows command line. Enter the created yii2 directory.
To install the basic version of the yii2.0 framework, execute the command:
composer create-project --prefer-dist yiisoft/yii2-app -basic basic
#Test whether the basic version is installed successfully. Enter: http://localhost/yii2/basic/web/index.php in the address bar of the browser. The premise is that the php web service is running.
Related tutorial recommendations: yii framework
The above is the detailed content of How to download and install the yii2.0 framework. For more information, please follow other related articles on the PHP Chinese website!