來張圖就好啦!我不細說啦php
composer self-update
composer config -g repo.packagist composer https://packagist.phpcomposer.com
在你的項目根目錄下新建一個composer.json文件,該文件裏的內容就是你要下載關聯的插件html
好比我要用到一個websocket插件,只須要寫入以下內容:git
{ "require": { "textalk/websocket": "1.0.*" } }
而後經過命令行進入到該項目根目錄執行如下命令:github
composer install
執行後會把github上的源碼下載到本地,而後根據相關說明引用類就能夠了web
[Composer\Downloader\TransportException] Your configuration does not allow connections to http://getcomposer.org/dow nload/1.7.2/composer.phar.sig. See https://getcomposer.org/doc/06-config.md #secure-http for details.
解決方法是設置一個本地或全局的composer配置: composer config secure-http false 全局設置: composer config -g secure-http false
持續記錄中..................json