2011-02-07 58 views
4

我認爲在SO中安裝ZFDebug教程會很好。在ZF上安裝ZFDebug工具欄1.10+

我想知道你是否可以使用ZFDebug toolbarZF 1.10+(我實際上使用1.11.2)。我有下面的代碼在我的引導,但好像沒有什麼改變:

protected function _initZFDebug() 
{ 
    $autoloader = Zend_Loader_Autoloader::getInstance(); 
    $autoloader->registerNamespace('ZFDebug'); 

    if ('development' == APPLICATION_ENV) { 
    $options = array(
     'jquery_path' => 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', 
     'plugins' => array('Variables', 
     'Html', 
     'Database' => array(), 
     'File' => array('basePath' => APPLICATION_PATH . '/application'), 
     'Memory', 
     'Time', 
     'Registry', 
     //'Cache' => array('backend' => $cache->getBackend()), 
     'Exception') 
    ); 
    $debug = new ZFDebug_Controller_Plugin_Debug($options); 

    $this->bootstrap('frontController'); 
    $frontController = $this->getResource('frontController'); 
    $frontController->registerPlugin($debug); 
    } 
} 
+0

你是否得到它的工作?你是怎麼做到的 ? – max4ever 2011-05-06 09:58:34

+0

@ max4ever - 請參閱(唯一)回答 – nevvermind 2011-05-06 19:28:43

回答

2
  1. 確保您APPLICATION_ENV設置爲'development'
  2. 確保有一個有效佈局(與<head><body>
  3. basePath選項應該是APPLICATION_PATH . '/../'