How to install the Yii framework using composer _php instance

Source: Internet
Author: User
Tags php framework smarty template yii

The example in this article describes how to install the Yii framework using composer. Share to everyone for your reference, specific as follows:

It is now popular to install the PHP framework using composer, composer is the tool that PHP uses to manage dependencies, yii,laravel, seven cows, etc. frameworks or services are used composer as the preferred tool for installation.

The following is an example of installing the YII framework to learn to install the PHP framework using composer:

First go to composer to download and install this tool.

Installing Yii via Composer

This is the preferred method of installing Yii2.0. If you have not installed composer, you can follow the instructions here to install.

After installing composer, run the following command to install the composer Asset plugin:

Copy Code code as follows:
PHP Composer.phar global require "fxp/composer-asset-plugin:1.0.0"

Now select one of the application templates to begin installing YII 2.0. An application template is a skeleton Web application package that contains Yii writes.

Install the basic Application template and run the following command:

Copy Code code 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 Code code 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 username and password during the installation process. This is normal. Just enter them and continue.

Turn from: Small Talk blog http://www.tantengvip.com/2015/05/composer-php/

More about Yii related content readers can view the site topics: "Yii framework Introduction and common skills Summary", "PHP Excellent Development Framework Summary", "Smarty Template Primer Tutorial", "PHP date and Time usage summary", "PHP object-oriented Programming Program", " Summary of PHP string usage, Introduction to PHP+MYSQL database operations, and a summary of PHP common database operations Tips

I hope this article will help you with the PHP program design based on the YII framework.

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.