Online installation version:
http://www.phpcomposer.com/
This is a domestic composer website.
The THINKPHP5 comes with a Composer.phar component and requires installation if it is not installed
The following commands are all running under the project directory
Windows first adds the PHP path to the system's environment variables
Installation
php -r "copy(‘https://getcomposer.org/installer‘, ‘composer-setup.php‘);"php composer-setup.php
Delete composer-setup.php
New Composer.json Empty file (if not present) the contents of the file are:
{}
Run command
install
New Project Introduction
If it's a new project, not THINKPHP5, then introduce the autoload.php file in your PHP file
Update composer
php composer.phar selfupdate
Modify Source Address
Use domestic source address to increase installation speed of components
php composer.phar config repo.packagist composer https://packagist.phpcomposer.com
Adding components
php composer.phar require aliyuncs/oss-sdk-php
Where aliyuncs/oss-sdk-php is the component name
component names can be searched from https://packagist.org/to
Updating components
php composer.phar update --dry-run #查看看可升级的组件php composer.phar update
Working with Components
You can introduce components by applying namespaces.
Uninstalling components
php composer.phar remove aliyuncs/oss-sdk-php
Uninstalling the component will unload the other components that are introduced.
Local Installation version:
No way to install or be a wall what to do to download an east-east name:
The following commands are executed:
Composer source is easy to access within, change Source: Php composer.phar config repo.packagist composer https://packagist.phpcomposer.com update Source: PHP Composer.phar Update
After that, thank you: Jozfne share
Using Composer in PHP