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.
The file name after renaming is composer, not composer.phar. Enter it directly
composer search
composer search xxx
composer.phar
是一个打包了的php
程序。其实还是一个文件,和其它的php
文件一样可以php composer.phar
打开,同样也可以./composer.phar
。但是你把composer.phar
移动到/usr/local/bin
去了,而且改了名字composer
,所以你可以直接使用composer
命令了。至于为什么用php composer.phar
不行了,因为你的文件在当前目录没有composer.phar
Yeah.