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