Installation of composer and YII2 installation in Windows environment

Source: Internet
Author: User

1. Download the Composer-setup.exe first: download composer. will automatically search the Php.exe installation path, if not, manually find the PHP path under the Php.exe.

2. In the PHP directory, open the php.ini file and turn on the OpenSSL extension. Remove the semicolon in front of the Extension=php_openssl.dll (;)

3. Add the PHP directory to the environment variable (and the path to the Php.exe sibling directory) For example: D:\apache_php\php is added to the environment variable path.

4. Download Composer.phar,:composer.phar. Put the Composer.phar file in the PHP directory, create a new file in the PHP directory composer.cmd, the content is written: @php "%~dp0composer.phar"%* save. Run this file, and then open cmd run: Composer will appear

You can run composer--version to view the version of composer.

5. Execute at the command line:composer config -g repo.packagist composer https://packagist.phpcomposer.com

Get the WWW directory installed after phpstudy under the Yii2

Official Document: Http://www.yiichina.com/doc/guide/2.0/start-installation

In the WWW directory, press shift right to open cmd and run the next command.

Composer Create-project--prefer-dist yiisoft/yii2-app-advanced file name

Install the index.php file when the download is complete

Open File CD file name

Let's post init.

Installation of composer and YII2 installation in Windows environment

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.