1. Download composer
Website download: https://getcomposer.org/download/
2. Enable support for PHP's OpenSSL
Modifying a configuration file php.ini
Remove the comments in front of Extension=php_openssl.dll
3, installation composer
The "Next" installation is complete.
After installation, you will be prompted to reopen the cmd command line to use.
4. Download Yii2–basic Template
Official website Download: http://www.yiiframework.com/download/
Download complete extract to Web-accessible directory
Generally htdocs or www
5. Installation via composer
Open cmd, jump Web Access Directory
I'm here, D:\phpStudy\WWW .
Let's create an app called "Yiidemo".
Enter the command:
composer Create-project–prefer-dist–stability=dev Yiisoft/yii2-app-basic. /yiidemo
If it generates, it indicates success
After successful browser input http://localhost/yiidemo/web/index.php , such as
If you are installing advanced instead of basic, you can change basic to advanced when you install it, and, of course, the advanced template is also available for download.
Set the folder name Yii2test to the last input link for http://localhost/yii2test/frontend/web/index.php
Effects such as:
Yii Framework first step--Installation