问题描述
我正在尝试为ZF2
beta5安装 ZendDeveloperTools
模块.这是我到目前为止执行的步骤:
I'm trying to install the ZendDeveloperTools
modules for ZF2
beta5. Here are the steps I followed so far:
-成功安装 ZendSkeletonApplication
.
-将模块下载到我的./vendor
目录中.
-启用./config/application.config.php
中的模块:
-Successfully installed ZendSkeletonApplication
.
-Downloaded the module into my ./vendor
directory.
-Enabled the module in ./config/application.config.php
:
<?php
return array(
'modules' => array(
'Application',
'ZendDeveloperTools', // Added this line
),
'module_listener_options' => array(
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
'module_paths' => array(
'./module',
'./vendor',
),
),
);
-将./vendor/ZendDeveloperTools/config/zenddevelopertools.local.php.dist
复制到./config/autoload/zenddevelopertools.local.php
.
-编辑zenddevelopertools.local.php
如下:
<?php
return array(
'zdt' => array(
'profiler' => array(
'enabled' => true,
'strict' => true,
'verbose' => true,
'flush_early' => false,
'cache_dir' => 'data/cache',
'collectors' => array(),
'verbose_listeners' => array('application' => array(
'ZDT_TimeCollectorListener' => true,
'ZDT_MemoryCollectorListener' => true,
))
),
'toolbar' => array(
'enabled' => true,
'auto_hide' => false,
'position' => 'bottom',
'version_check' => false,
'entries' => array(),
),
),
);
-在我的./public/index.php
中添加了define('REQUEST_MICROTIME', microtime(true));
-将我的./composer.json
替换为ZendDeveloperTools
模块中提供的模块.
-删除了引起问题的29行末尾的,
(不应存在):
-Added define('REQUEST_MICROTIME', microtime(true));
in my ./public/index.php
-Replaced my ./composer.json
with the one provided in the ZendDeveloperTools
module.
-Removed the ,
at the end of line 29 which was causing problems (shouldn't be there):
-运行作曲家更新:
$ php composer.phar update
Updating dependencies
- Updating zendframework/zendframework (dev-master)
Checking out 9f4dd7f13c8e34362340072d0e2d13efe15e4b1f
Writing lock file
Generating autoload files
-在./public/index.php
中添加了error_reporting(E_ALL); ini_set('display_errors', '1');
以捕获潜在的错误
-Added error_reporting(E_ALL); ini_set('display_errors', '1');
to ./public/index.php
to catch potential errors
当我访问我的应用程序时,我没有收到任何错误(我获得了骨架应用程序主页),但是没有显示zend开发人员工具栏
When I access my application I don't get any errors (I get the skeleton application home page) but the zend developer toolbar isn't show up
我缺少使用和显示zend开发人员工具栏的地方吗?
推荐答案
这是一个愚蠢的错误,我将zenddevelopertools.local.php
放入了./config
而不是./config/autoload
中.以上说明正确无误.对于那些好奇的人来说,工具栏是这样的:
It was a stupid mistake, I had placed zenddevelopertools.local.php
into ./config
and not ./config/autoload
. Above instructions are correct. Here is what the toolbar looks like for those who are curious:
这篇关于ZendDeveloperTools模块未在ZF2 beta5中显示工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!