我是 symfony2 的新手,正在阅读 symblog.在第三章尝试使用数据夹具时,我尝试了以下命令:
I am new to symfony2 and reading symblog. In third chapter while trying with data-fixtures I tried the command:
php composer.phar 更新
但我得到了错误:
无法打开输入文件:composer.phar
所以我用谷歌搜索了一下并尝试了
So I googled a little and tried
php composer.phar install但仍然出现相同的错误.所以请指导如何处理这个作曲家以使用 wamp 在 symfony2 中安装新的扩展或包,如数据夹具.
but still getting the same error. So please guide how to deal with this composer to install new extentions or bundles like data-fixtures in symfony2 using wamp.
推荐答案我在 Windows 上遇到了同样的问题并使用了不同的解决方案.我使用了由 Composer 网站提供的 Composer_Setup.exe 安装文件,它进行了全局安装.
I had the same problem on Windows and used a different solution. I used the Composer_Setup.exe installation file supplied by the composer website and it does a global install.
安装后,请确保您的 PATH 变量指向存储 composer.phar 的目录.这通常是 C:ProgramDataComposerSetupin(ProgramData 可能是一个隐藏目录).不用说,但也要确保 PHP 可执行文件也在您的 PATH 变量中.
After installing, make sure your PATH variable points to the directory where composer.phar is stored. This is usually C:ProgramDataComposerSetupin (ProgramData might be a hidden directory). It goes without saying, but also be sure that the PHP executable is also in your PATH variable.
然后你可以简单地调用
composer install代替
php composer.phar install更多推荐
运行 Composer 返回:“无法打开输入文件:composer.phar";
发布评论