我使用Zend Debugger来调试基于Zend Framework构建的php应用程序。 目前我运行的是1.10.6版本。 当调试我的应用程序我得到这个错误:无法重新声明类Zend_Loader_Autoloader
Compile Error: /var/www/Zend/ZendFramework-1.10.6/library/Zend/Loader/Autoloader.php line 36 - Cannot redeclare class Zend_Loader_Autoloader
这只是在Zend Framework中的一个错误还是有什么关系,我application.php配置错误?
$paths = array(
realpath(dirname(__FILE__).'/../library'),
'.',
);
*/
defined('APPLICATION_PATH')
or define('APPLICATION_PATH', realpath(dirname(__FILE__).'/../application'));
defined('APPLICATION_ENV')
or define('APPLICATION_ENV', 'development');
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH.'/../library'),
)));
//require_once('Zend/Loader/Autoloader.php');
require_once('Zend/Application.php');
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH.'/configs/events.ini'
);
$application->bootstrap()->run();
可能错误与Zend Debugger的配置有关。测试Zend Debugger时,我已经有这个错误。坏事是我没有解决这个问题......测试时,我的应用程序没有错误。 – 2010-07-29 16:57:17
当我跳过它时它会终止我的调试会话。所以我必须先解决这个问题 – sanders 2010-07-29 17:00:02
我建议你看看调试器,而不是代码,这种错误不仅发生在自动加载器上。例如,看看这个: http://zend-framework-community.634137.n4.nabble.com/Using-Zend-Studio-5-5-0-Debugger-td644517.html http:// markmail.org/message/xyyntiwkfja2awya 我很厌烦看到这个问题的解决方案。 – 2010-07-29 17:12:12