Blogger Information
Blog 42
fans 0
comment 0
visits 15659
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0823 composer常用指令与操作
小言
Original
437 people have browsed it

1. composer版本信息查看

  1. composer -v

2.如果安装一个composer 包

1.通过https://packagist.org/ 网站,查找需要安装的包,直接在哪里获取安装命令。

2.找到对应包的官方网站,获取安装命令

3这样就安装和创建好了一个composer 的初始配置


3.composer 引用方法

  1. require_once 'vendor/autoload.php';

4.常用指令

  1. # 更新所有依赖
  2. $ composer update
  3. # 更新指定的包
  4. $ composer update monolog/monolog
  5. # 更新指定的多个包
  6. $ composer update monolog/monolog symfony/dependency-injection
  7. # 列出所有已经安装的包
  8. $ composer show
  9. composer 查看所有命令 composer list
  10. composer 清除缓存 composer clear-cache
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post