Use Composer to install the Yii framework.

Source: Internet
Author: User
Tags php framework

Use Composer to install the Yii framework.

This example describes how to install the Yii framework using Composer. We will share this with you for your reference. The details are as follows:

Currently, Composer is widely used to install the PHP framework. Composer is a tool used by PHP to manage dependencies. Frameworks and services such as Yii, Laravel, and qiniu use Composer as the preferred tool for installation.

The following uses downloading and installing the Yii framework as an example to learn how to use Composer to install the PHP framework:

First go to Composer to download and install this tool.

Install Yii through Composer

This is the preferred method for installing Yii2.0. If you have not installed Composer, follow the instructions here to install it.

After installing Composer, run the following command to install the Composer Asset plug-in:

Copy codeThe Code is as follows: php composer. phar global require "fxp/composer-asset-plugin: 1.0.0"
Select one of the application templates to install Yii 2.0. An Application Template is a skeleton Web application package containing Yii.

Install the basic application template and run the following command:

Copy codeThe Code is as follows: php composer. phar create-project yiisoft/yii2-app-basic basic 2.0.4
Install the Advanced Application Template and run the following command:

Copy codeThe Code is as follows: php composer. phar create-project yiisoft/yii2-app-advanced advanced 2.0.4
Please note that you may be prompted to enter your GitHub user name and password during installation. This is normal. Just enter them and continue.

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.