0

我正在尝试将工作作为本地项目。我是通过 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();
4

1 回答 1

0

您在评论中包含的错误消息显示了 include_path of .;C:\php\pear,其中不包括您的应用程序的“库”文件夹,或者您在问题中包含的引导程序中添加的任何其他路径。所以要么这个引导程序没有运行,要么它在你的应用程序的其他地方被覆盖。

于 2013-01-10T15:11:42.580 回答