我正在尝试安装phpmailer
,并已将其信息复制粘贴到composer.json file
中。该文件已经包含以下内容:
{ "require" : {
"facebook/php-sdk-v4" : "4.0.*" } }
如何添加phpmailer
需要添加到composer.json
的所有内容而不导致错误?
避免编辑JSON的最简单方法是完全使用命令行:
composer require "facebook/php-sdk-v4:4.0.*"
composer require ...more stuff...
作为同一组大括号内以逗号分隔的元素列表:
{
"name": "stuff/stuff",
"require": {
"facebook/php-sdk-v4" : "4.0.*",
"stuff/stuff": "*",
"morestuff": "~4.8"
},
"authors": [
{
"name": "your name",
"email": "email@domain.com"
}
]
}