Jav*_*der 2 cakephp cakephp-2.0 cakephp-2.1
我曾尝试使用cakephp Debugkit工具栏cakephp 2.1.3...但它不能正常工作..
我已经在cakephp 1.3它上面实现了debugkit 工作正常..
我下载了debugkit for cakephp 2.1.3.我重新检查了..
我是如何实现的?
app/plugin/DebugKit ///this is my path for debugkit
Run Code Online (Sandbox Code Playgroud)
我查了一下我的调试模式是2 ..
Configure::write('debug', 2);
Run Code Online (Sandbox Code Playgroud)
我如何在Appcontroller中加载我的调试工具包..'
public $components = array('DebugKit.Toolbar');
Run Code Online (Sandbox Code Playgroud)
它显示错误
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
Run Code Online (Sandbox Code Playgroud)
我从不同的源下载调试包但结果相同.
谢谢 !
它在此函数和行中显示错误
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);
};
};
Run Code Online (Sandbox Code Playgroud)
我最后在bootstrap.php中加载了文件
CakePlugin::loadAll();
Run Code Online (Sandbox Code Playgroud)
错误:-
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
Run Code Online (Sandbox Code Playgroud)