Windows YII2 Installation

Source: Internet
Author: User
Tags yii

YII2 Basic version Window installation steps

1. The window needs to download and run Composer-setup.exe

Self-Baidu search composer Download installation
Composer after installation, switch to a WEB-accessible directory

2. Enter the DOS command window via windows ' cmd ' command and execute the following command:

Composer global require "fxp/composer-asset-plugin:~1.1.1";

PS:1.1.1 and installed composer version number corresponds to

3. After installation, enter the command:

Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-basic basictest;

Ps:yiisoft/yii2-app-basic basictest The last basictest is a folder name that can be customized

4, modify the config/web.php file, add a key to the Cookievalidationkey configuration item (if you install through Composer, This step is completed automatically):

// !!! Insert a key below (if blank)-For cookie validation ' cookievalidationkey ' = ' Enter your key here ',

5. Verifying the results of the installation
Once the installation is complete, you can use the browser to access the newly installed YII application via the following URL:

http://localhost/basic/web/index.php

This URL assumes that you have Yii installed in a basic directory located in the root directory of the Web document and that the Web server is running on your own computer (localhost). You may need to adjust it to fit your installation environment.

Windows YII2 Installation

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.