【发布时间】:2012-05-29 07:59:47
【问题描述】:
我曾尝试为cakephp 2.1.3 使用 cakephp Debugkit 工具栏...但它不能正常工作..
我已经在cakephp 1.3 上实现了调试工具包,它工作正常..
我为cakephp 2.1.3 下载了调试工具包。我重新检查了..
我是如何实现的??
app/plugin/DebugKit ///this is my path for debugkit
我检查了我的调试模式是 2..
Configure::write('debug', 2);
我如何在 Appcontroller 中加载我的调试工具包..'
public $components = array('DebugKit.Toolbar');
显示错误
Parse error: syntax error, unexpected T_FUNCTION in /var/www/guest1/cakephp-2.1.3/app/Plugin/debug_kit/Controller/Component/ToolbarComponent.php on line 165
我从不同的来源下载调试工具包,但结果相同。
谢谢!
这个函数和行显示错误
public function implementedEvents() {
$before = function ($name) {
return function () use ($name) {
DebugTimer::start($name, __d('debug_kit', $name));
};
};
$after = function ($name) {
return function () use ($name) {
DebugTimer::stop($name);
};
};
最后我在 bootstrap.php 中加载了文件
CakePlugin::loadAll();
错误:-
Error: DebugKit.ToolbarComponent could not be found.
Error: Create the class ToolbarComponent below in file: /var/www/guest1/cakephp-2.1.3/app/Plugin/DebugKit/Controller/Component/ToolbarComponent.php
【问题讨论】:
-
你能告诉我们
ToolbarComponent.php中的第165行看起来像E吗? -
@SiGanteng 看到我用第 no 行更新了我的错误
标签: cakephp cakephp-2.0 cakephp-2.1