如何从任何地方运行作曲家? [英] How to run composer from anywhere?
本文介绍了如何从任何地方运行作曲家?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚在我的 / usr / bin
文件夹中安装了composer,所以当从该文件夹运行 php composer.phar
我得到关于作曲家的帮助信息。但是,当我尝试从其他文件夹运行相同时,得到无法打开输入文件:composer.phar
。
如何从没有问题的地方调用 php composer.phar
?
< composer.phar可以独立运行,不需要用
php
作为前缀。 这应该解决你的问题(在bash的$ PATH和php的include_path的区别)。 I have just installed composer in my /usr/bin
folder, so when from that folder I run php composer.phar
I get the help info about composer. But, when I try to run the same from other folder I get Could not open input file: composer.phar
.
How to call php composer.phar
from every where without problems?
解决方案
composer.phar can be ran on its own, no need to prefix it with php
. This should solve your problem (being in the difference of bash's $PATH and php's include_path).
这篇关于如何从任何地方运行作曲家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文