0

どちらの場合でも、Windowsとubuntuにインストールしようとしましたが、同じエラーが発生しました:入力ファイルを開けませんでした:composer.phar

私はenvパス変数をいじっていません。php.ini で openssl のコメントを外しました。YII の専門家による支援があれば幸いです。YII 2.0 を動作させることができないためです。

4

1 に答える 1

0

There are two ways to use Composer: either download the file composer.phar (phar stands for PHP Archive) and place it in your working directory, or install it globally.

If you downloaded the phar, you need to run Composer commands like this:

php composer.phar <command>

But if you installed it globally (by running Composer-Setup.exe on Windows, or placing composer.phar in /usr/local/bin/composer on Linux), you need to run it like this:

composer <command>

(where you replace <command> with one of the available commands, such as install, update or self-update)

It seems like you have installed Composer globally, but are running it with php composer.phar. Because the file composer.phar does not exist in your current directory, it returns the 'Could not open input file' error.

For more information, see the chapter 'Using Composer' in the Composer documentation.

于 2014-05-01T12:44:42.690 に答える