2
我想从命令行运行一个php脚本。symfony 2命令问题
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
{
好的,谢谢,我该如何找出命令和参数的名称? – richelliot 2013-03-27 10:58:19
@richelliot你使用'configure'函数 - > http://symfony.com/doc/current/cookbook/console/console_command.html – ManseUK 2013-03-27 11:28:42