- Install a PHP environment larger than 5.4 or higher and open the OpenSSL extension. If it is an Apache server, load the Apache mod_ssl module.
- Download composer and install.
- Start and run "or win+r"->cmd, enter composer at the command line to see if composer is installed successfully:
-
- If the composer installation succeeds:
self-update命令更新Composer为最新版本,然后进入你要安装yii的有效web目录
- Install composer Asset plugin:
composer global require "fxp/ composer-asset-plugin:~1.1.2 ", the last ~1. 1.2 is you composer the latest version number
- install YII2 in the active web directory of the Yii directory ( Installation will be slow, leave him alone, the input token is hidden, paste once )
composer create-project --prefer-dist yiisoft/yii2-app-basic yii Premium edition composer create-project --prefer-dist Yiisoft/yii2-app-advanced yii
输入您github账户的Token,耐心等待安装
安装成功后在浏览器输入http://localhost/yii/web/index.php,出现如下界面,安装成功!
如果没有出现这个界面,可以通过【在浏览器输入http://localhost/yy/requirements.php】或者【在命令行进入requirements.php所在目录,执行php requirements.php】来查看是否满足Yii最基本需求.
Install via composer under Windows Yii2