2

在 Intervention Image 的网站上,它说要安装最新版本,我必须运行以下命令:

php composer.phar require intervention/image

我正在使用 Windows 8.1,我想这不起作用。我已经尝试过了,它说:无法打开输入文件:composer.phar

我错过了一些很容易的事情吗?

4

5 回答 5

12

使用此命令

composer require intervention/image
于 2019-04-29T07:03:46.850 回答
6

正如 Sinan Bolel 提到的,在 Windows 中,输入“composer”而不是“php composer.phar”,然后......

于 2015-05-20T23:31:00.690 回答
2

首先你指向你的项目目录,然后你应该运行“composer require intervention/image””命令。

你这样的结果

Admin@Admin-dell MINGW64 /c/xampp/htdocs/laravel_dev
$ composer require intervention/image
Using version ^2.3 for intervention/image
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing psr/http-message (1.0)
    Loading from cache

  - Installing guzzlehttp/psr7 (1.3.0)
    Loading from cache

  - Installing intervention/image (2.3.7)
    Downloading: 100%

intervention/image suggests installing ext-imagick (to use Imagick based image processing.)
intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader

Admin@Admin-dell MINGW64 /c/xampp/htdocs/laravel_dev
于 2016-06-09T09:20:54.980 回答
0

为了使用composer,您首先需要安装它。

https://getcomposer.org/doc/00-intro.md#installation-windows

于 2015-05-20T23:21:47.297 回答
0
composer require intervention/image

并在config/app.php

return [
    ...
    $provides => [
        ...
        Intervention\Image\ImageServiceProvider::class
    ],
    $aliases => [
        ...
        'Image' => Intervention\Image\Facades\Image::class
    ]
]
于 2021-02-01T12:28:01.383 回答