Win7 System installation YII2 Tutorial win7 system how to install Yii2

Source: Internet
Author: User
Tags require

In Windows, you first need to download and run the Composer-setup.exe

Installation process to select the running directory of PHP, installed in Windows under the CMD run composer to see if the installation was successful.

The image above shows that the installation was successful.

Switch to program execution directory under CMD to execute the following program

Composer Global require "fxp/composer-asset-plugin:1.2.0

Execute after Success

Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced E:/apiweb/bootstrap/apidoc

Note: E:/apiweb/bootstrap/apidoc is the directory of the program, it is recommended to write a full directory

After waiting for a long time, note that you also need to write GitHub on the token, specific methods to obtain the query.

Looking at the above procedure is simple, but often the actual operation will be a variety of problems, the following is a summary of the various problems.

question one: lack of OpenSSL.

Workaround: Open in php.ini; Extension=php_openssl.dll, remove the semicolon, open the extension

Phpinfo View after success

question two: lack of mbstring

WORKAROUND: Open the extension in php.ini; Extension=php_mbstring.dll, remove the semicolon, open the extension

question three: Look at the picture below

This problem has been checked a lot of said that may be composer-asset-plugin:~1.1.1 version is too low, you have to upgrade it.

Composer Global require "fxp/composer-asset-plugin:1.2.0

Follow the previous steps to go through, execute this command, execute the installation command, wait patiently, MA, the problem still, continue to find the final solution is

Composer Global require "fxp/composer-asset-plugin:~1.2.0

Comrades found that different, take a closer look at it, the implementation of the installation of the step finally passed, finished.

The completion of the basic installation is complete, and the following steps are initialized

First enter your installed project directory to find the init script

1. Execute init script

2, select 0 development environment, 1 build environment

3, whether to determine: Yes

After installation by Access:/apidoc/frontend/web/index.php This path can see the Yii Welcome home page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.