Composer Yii2 Non-global variable archive installation Win7

Source: Internet
Author: User

1. Download Composer_installer.phar

Https://getcomposer.org/composer.phar

Rename to Composer_installer.phar

Put the file in the root directory www

2. Open the OpenSSL extension for PHP

Open the corresponding PHP version of Php,ini

Remove annotations;

3. Installing composer

CMD, D: CD d:/phpstudy/www
PHP Composer_installer.phar

4. Set non-global variables but you can use the composer command directly

Under c:/, create the Initcmdenv.cmd file content as follows

@echo off:: Temporary system path (add additional path for the current command line, can be arbitrarily increased without affecting the global system) set path=%path%;:: Commands (Add new Shortcut command, must be doskey shortcut name = Full command) DOSKEY composer=php D:/phpstudy/www/composer.phar $*::show Something (display initialized content, can be deleted) echo ========doskey======== ==doskey/macrosecho ========end==========

Create a C:\Windows\System32\cmd.exe shortcut

Set Kaixie mode target to%windir%/system32/cmd.exe/k c:/initcmdenv.cmd

Once set up, run the Cmd.exe shortcut directly to use the composer command directly from anywhere on the command line.

5. Download the composer archive package

2 versions, advanced and basic:

Https://github.com/yiisoft/yii2/releases/download/2.0.9/yii-advanced-app-2.0.9.tgz

Https://github.com/yiisoft/yii2/releases/download/2.0.9/yii-basic-app-2.0.9.tgz

Download and unzip to the root directory WWW

Add a Chinese mirror address to the extracted archive package Composer.json

{"   repositories": {"      packagist": {"        type": "Composer",        "url": "Https://packagist.phpcomposer.com"      }    }          }

6. Require "fxp/composer-asset-plugin:~1.1.1" query and add the latest version

Or

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

7. Create a YII2 project

CMD, D: cd D:/phpstudy/www/baisc (adcanced)

Advanced

Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced. /yii2test

Basic

Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-basic. /yii2test

8.Token (GitHub)

Create a new Token

Https://github.com

Myid:[email protected]**.com password:23*********

You will get the token input.

Composer Yii2 Non-global variable archive installation Win7

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.