我正在尝试将工作作为本地项目。我是通过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();
答案 0 :(得分:0)
评论中包含的错误消息显示.;C:\php\pear
的include_path,其中不包含应用程序的“库”文件夹,或者您在问题中包含的引导程序中添加的任何其他路径。因此,要么没有运行此引导程序,要么在应用程序的其他位置覆盖它。