I downloaded and installed composer on the server, and then moved composer.phar to /usr/local/bin/composer
Then I opened the project directory and ran php composer.phar search. Could not open input file appeared : composer.phar,
I also tried other commands, but still got this error.
滿天的星座2017-05-24 11:36:07
The file name after renaming is composer, not composer.phar. Enter it directlycomposer search
漂亮男人2017-05-24 11:36:07
composer.phar
是一个打包了的 php
程序。其实还是一个文件,和其它的 php
文件一样可以 php composer.phar
打开,同样也可以 ./composer.phar
。但是你把 composer.phar
移动到 /usr/local/bin
去了,而且改了名字 composer
,所以你可以直接使用 composer
命令了。至于为什么用 php composer.phar
不行了,因为你的文件在当前目录没有 composer.phar
Yeah.