The example in this article describes how to use Composer to install the Yii framework. Share it with everyone for your reference, the details are as follows:
It is now popular to use Composer to install PHP frameworks. Composer is a tool used by PHP to manage dependencies. Frameworks or services such as Yii, Laravel, Qiniu, etc. all use Composer as the preferred tool for installation.
The following is an example of downloading and installing the Yii framework to learn how to use Composer to install the PHP framework:
First go to Composer to download and install this tool.
Install Yii via Composer
This is the preferred method to install Yii2.0. If you don't have Composer installed yet, you can follow the instructions here to install it.
After installing Composer, run the following command to install the Composer Asset plug-in:
Copy code The code is as follows: php composer.phar global require "fxp/composer-asset-plugin:1.0.0"
Now select one of the application templates to start installing Yii 2.0. An application template is a package containing a skeleton web application written in Yii.
To install the basic application template, run the following command:
Copy code The code is as follows: php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.4
To install the advanced application template, run the following command:
Copy code The 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 username and password during the installation process. This is normal. Just enter them and continue.
Reprinted from: Xiaotan Blog http://www.tantengvip.com/2015/05/composer-php/
Readers who are interested in more Yii-related content can check out the special topics on this site: "Introduction to Yii Framework and Summary of Common Techniques", "Summary of Excellent PHP Development Framework", "Basic Tutorial for Getting Started with Smarty Templates", "php Date and Time" Usage Summary", "php object-oriented programming introductory tutorial", "php string (string) usage summary", "php mysql database operation introductory tutorial" and "php common database operation skills summary"
I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.