安装 composer
- 下载安装脚本 - composer-setup.php - 到当前目录。
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
- 执行安装过程。
php composer-setup.php
- 删除安装脚本。
php -r "unlink('composer-setup.php');"
- 转为全局安装
sudo mv composer.phar /usr/local/bin/composer
- 更新
composer selfupdate
改为国内镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
解除国内镜象
composer config -g --unset repos.packagist
常用依赖包
- phpspreadsheet(php excel导入导出)
composer require phpoffice/phpspreadsheet
- phpmailer (php实现表单发邮件 发邮件给站长)
composer require phpmailer/phpmailer
目前评论:0