我正在尝试将工作作为本地项目。我是通过 svn 得到的,以前我从来没有处理过它。
尝试触发 indexController 时出现此错误:
Fatal error: Class 'Zend_Controller_Action' not found
所有的图书馆似乎都在我的项目中。有谁知道这是从哪里来的?
提前致谢
我的引导它有帮助:
<?php
/**
* Init application directory
*/
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../applications/' . APPLICATION_NAME . '/'));
defined('PROJECT_PATH')
|| define('PROJECT_PATH', realpath(__DIR__ . '/..'));
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
/**
* Init error
*/
ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
error_reporting(E_ALL);
/**
* Set libraries include path
*/
set_include_path(implode(PATH_SEPARATOR, array(
APPLICATION_PATH . DIRECTORY_SEPARATOR . 'services',
PROJECT_PATH . DIRECTORY_SEPARATOR . 'inline',
PROJECT_PATH . DIRECTORY_SEPARATOR . 'library',
PROJECT_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'Doctrine',
PROJECT_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'Doctrine' . DIRECTORY_SEPARATOR . 'Doctrine',
PROJECT_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'Doctrine' . DIRECTORY_SEPARATOR . 'extension' . DIRECTORY_SEPARATOR . 'Sortable' . DIRECTORY_SEPARATOR . 'lib',
PROJECT_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'Doctrine' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'sfYaml',
APPLICATION_PATH . DIRECTORY_SEPARATOR . 'models',
APPLICATION_PATH . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'amf',
APPLICATION_PATH . DIRECTORY_SEPARATOR . 'controllers',
APPLICATION_PATH . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'doctrine',
APPLICATION_PATH . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'doctrine' . DIRECTORY_SEPARATOR . 'data',
get_include_path(),
)));
/**
* Zend application
*/
require_once 'Zend' . DIRECTORY_SEPARATOR . 'Loader' . DIRECTORY_SEPARATOR . 'Autoloader.php';
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
/**
* Config
*/
global $config;
$config = new Zend_Config_Ini(APPLICATION_PATH . DIRECTORY_SEPARATOR . 'configs' . DIRECTORY_SEPARATOR . 'application.ini', APPLICATION_ENV);
date_default_timezone_set('Europe/Paris');
/**
* Doctrine
*/
$dsn="mysql:dbname=" . $config->resources->db->dbname . ";host=" . $config->resources->db->host;
Doctrine::setExtensionsPath(PROJECT_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'Doctrine' . DIRECTORY_SEPARATOR . 'extension');
$manager = Doctrine_Manager::getInstance();
$manager->registerExtension('Sortable',PROJECT_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'Doctrine' . DIRECTORY_SEPARATOR . 'extension' . DIRECTORY_SEPARATOR . 'Sortable' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'Doctrine' . DIRECTORY_SEPARATOR . 'Template');
$dbh = new PDO($dsn, $config->resources->db->username, $config->resources->db->password);
$conn = Doctrine_Manager::connection($dbh,'portail');
$conn->setOption('username', $config->resources->db->username);
$conn->setOption('password', $config->resources->db->password);
$conn->setCharset("utf8");
$conn->setCollate('utf8_general_ci');
$conn->setAttribute(Doctrine::ATTR_USE_NATIVE_ENUM, true);
$layout = new Zend_Layout();
$layout->setLayoutPath('/layouts/scripts/');
/**
* Router
*/
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();