PHP应用\console不工作试图创建Symfony 2的包 [英] PHP app\console wont work trying to create bundle for Symfony 2
问题描述
我在一个Xampp服务器上安装了Symfony2,PHP 5.3.8,一切正常(php,symfony演示页)。
I have installed Symfony2 on a Xampp server with PHP 5.3.8 and everything works ok ( the php, the symfony demo page ).
自己的helloWorld,如教程所述:
I try to create my own helloWorld, as the tutorial says :
php app / console generate:bundle --namespace = Acme / HelloBundle --format = yml
php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml
我去开始 - >运行 - > CMD,并把这行代码,它给我回来:
I go Start->Run->CMD and put that line of code and it gives me back this :
无法打开输入文件:app / console
could not open input file : app/console
推荐答案
要执行命令,您应该移动到项目的根目录/
To execute command you should move to root directory of your project in terminal/CMD.
请注意,在版本2.5
中进行了一些更改,因此命令将无法使用 app / console
Please note that in version 2.5
some changes has been made so command will not work with app/console
注意:从2.5
替换为 bin / console
。
Note: From 2.5 app/console
is replaced by bin/console
.
Please check here for changes. Also check this for more details about difference.
这篇关于PHP应用\console不工作试图创建Symfony 2的包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!