需要从外部脚本(例如cron或其他)运行symfony任务。
尝试运行:
<?php
require_once(dirname(__FILE__).'/libs/symfony/config/ProjectConfiguration.class.php');
$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true);
$task = new parseTask($configuration->getEventDispatcher(), new sfFormatter());
$argumentsArray = array();
$optionsArray = array();
$task->run($argumentsArray, $optionsArray);
但它的回归
致命错误:未捕获的异常&#39; sfException&#39;有消息&#39;您必须在symfony项目目录中。&#39;在/public_html/libs/symfony/lib/task/sfBaseTask.class.php:116
答案 0 :(得分:0)
需要将目录更改为symfony,例如:
#include <boost/multi_array.hpp>