Php symfony 2命令问题
我正在尝试从命令行运行一个php脚本Php symfony 2命令问题,php,symfony,command,Php,Symfony,Command,我正在尝试从命令行运行一个php脚本 sudo vim UpdateLatestIssuesCommand.php 但它给了我以下错误: PHP Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand' not found in /Applications/MAMP/htdocs/imagine-publishing/src/Imagine/CorporateBundle/Comma
sudo vim UpdateLatestIssuesCommand.php
但它给了我以下错误:
PHP Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand' not found in /Applications/MAMP/htdocs/imagine-publishing/src/Imagine/CorporateBundle/Command/UpdateLatestIssuesCommand.php on line 12
我不明白为什么会出现这个错误,因为文件上说找不到它
这是我的密码:
<?php
namespace Imagine\CorporateBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class UpdateLatestIssuesCommand extends ContainerAwareCommand
{
您必须像这样运行命令
php app/console demo:greet Fabien
其中,demo:greet是命令名,Fabien是参数
原因
因为,控制台组件必须在运行命令之前为您引导所需的资源
仅供参考:好的,谢谢,我如何找到命令和参数的名称?@richeliot您使用配置函数->