如何在Symfony2中使用php控制台

Elz*_*ugi 3 command-line-interface symfony

我找到了控制台并像这样运行:

root@valugi-laptop:/var/www/sandbox/hello# php console
Symfony version 2.0.0-DEV - hello

Usage:
  Symfony [options] command [arguments]

Options:
  --help      -h  Display this help message.
  --quiet     -q  Do not output any message.
  --verbose   -v  Increase verbosity of messages.
  --version   -V  Display this program version.
  --color     -c  Force ANSI color output.
  --no-interaction -n  Do not ask any interactive question.
  --shell     -s  Launch the shell.

Available commands:
  help               Displays help for a command (?)
  list               Lists commands
assets
  :install           
bundle
  :pharize           
container
  :graphviz          
doctrine
  :generate-proxies  
init
  :application       
  :bundle            
router
  :debug             Displays current routes for an application
  :dump-apache       
Run Code Online (Sandbox Code Playgroud)

但我不能运行任何这些命令.我这样想:

php控制台Symfony -h

但我明白了

[InvalidArgumentException]         
Command "Symfony" is not defined.  
Run Code Online (Sandbox Code Playgroud)

有什么建议?

Ser*_*rgi 6

控制台使用如下: $ php app/console [command name]