[英]how to install 'amnah / yii2' in Yii 2.0?
How can i do this? 我怎样才能做到这一点? Despite my attempts I couldn't.
尽管我做了尝试,但我做不到。 I don't understand amnah's document.
我不明白阿玛娜的文件。 On the document;
在文件上; " Install Yii 2 using your preferred method Install package via composer "amnah/yii2-user": "~2.0" Update config file config/web.php and config/db.php "
“使用首选方法安装Yii2。通过作曲家“ amnah / yii2-user”安装软件包:“〜2.0”更新配置文件config / web.php和config / db.php“
But I could not use to composer. 但是我不能习惯作曲家。 Can you tell me, how can I do manual install?
您能告诉我,我该如何手动安装?
Solved: 解决了:
Well, I added "amnah/yii2-user": "dev-master" in "require" on composer.json file. 好吧,我在composer.json文件的“ require”中添加了“ amnah / yii2-user”:“ dev-master”。 Then "composer update" and work.
然后“ composer update”开始工作。
If you don't want to use composer , you can just download the library you need and then place it under the vendor/
directory, in your project's root. 如果您不想使用composer ,则只需下载所需的库,然后将其放在项目根目录下的
vendor/
目录下。
For example, if you want to use phpspec/php-diff in your project, you can download the project yourself (from github ) and then put it into vendor/
. 例如,如果要在项目中使用phpspec / php-diff ,可以自己下载项目(从github ),然后将其放入
vendor/
。 It should look like this: 它看起来应该像这样:
|--myproject
|--commands
|--config
|--controllers
...
|--vendor
|--phpspec
|--php-diff
This is basically what composer does when you install something via composer. 当您通过composer安装某些东西时,基本上这就是composer所做的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.