How to use composer on windows?(如何在 Windows 上使用作曲家?)
问题描述
我已经在我的电脑上安装了 xampp.之后我使用窗口安装程序安装了作曲家.在网站上,他们讲述了 composer.json 在示例中看起来像这样
I have installed xampp on my PC. After that I installed composer using window installer. On the website they tell about composer.json which looks something like this in the example
{
"require": {
"monolog/monolog": "1.2.*"
}
}
我把它放在哪里?我该如何运行它?我搜索了很多,但一无所获.任何建议都会很棒.
Where do I put it? How do I run it? I have searched a lot but found nothing. Any suggestion would be great.
我以管理员身份使用以下命令运行命令提示符
I ran command prompt as administrator with following command
C:windowssystem32>composer
它打印了一堆命令.我试着打字
It printed out a bunch of commands. I tried typing
C:windowssystem32>composer install
我收到 composer 找不到 composer.json 文件的错误
I got an error that composer could not find composer.json file
推荐答案
好的,假设您的网站位于:
Okay, let's say your website is at:
C:xampphtdocsmywebsite
你应该把 Composer 文件放在:
You should put the Composer file at:
C:xampphtdocsmywebsitecomposer.json
然后,在您的终端中,使用以下两个命令:
Then, in your terminal, use these two commands:
cd C:xampphtdocsmywebsite
composer install
应该是这样的.
您可以使用 Composer 做各种其他事情.找出终端中的 composer
类型.它将显示您可以使用的命令列表.
You can do various other things with Composer. To find out what type composer
in your terminal. It will show you a list of commands you can use.
如果您想了解更多关于命令的信息,可以使用 composer help [COMMAND]
,如下所示:
If you want to know more about a command then you can use composer help [COMMAND]
, like so:
composer help install
这篇关于如何在 Windows 上使用作曲家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Windows 上使用作曲家?
基础教程推荐
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01