我很难得到配置CakePHP的DebugKit。我已经阅读了这里的答案:How to Install DebugKit on CakePHP但它似乎没有帮助。安装CakePHP DebugKit
这是我迄今所做的:
创建的应用/插件目录名为DebugKit
从SVN下载的所有文件(它们有一个文件夹,名为debug_kit但我只是复制一切文件并将它们放在我新创建的DebugKit文件夹中)
取消注释行CakePlugin :: load('DebugKit'); //加载在bootstrap.php中
名为DebugKit一个插件我的AppController类现在看起来是这样
class AppController extends Controller {
public $components = array('DebugKit.Toolbar');
}
我core.php中有这样一行:
Configure::write('debug', 1);
而且我注释掉此行在文件default.ctp
<!-- <?php //echo $this->element('sql_dump'); ?> -->
我收到的错误消息是:
Error: The application is trying to load a file from the DebugKit plugin
Error: Make sure your plugin DebugKit is in the app\Plugin directory and was loaded
我一直URL重写启用按照下列指示:http://book.cakephp.org/2.0/en/installation/url-rewriting.html#apache-and-mod-rewrite-and-htaccess
我的Web应用程序的目录结构是这样的: WAMP/WWW/CakePHP的/
我也注意到,有一个名为plugins的文件夹在这个位置: cakephp/plugins - 我试图将下载的插件复制到该位置,但它也不起作用。
任何建议将不胜感激。
大号
如果您正在使用cakephp2 .x,你需要在bootstrap.php文件中手动加载插件。 CakePlugin :: loadAll(); //加载所有插件 CakePlugin :: load('DebugKit'); //加载一个插件 – Garry
感谢您的回复 - 但我已经在bootstrap.php文件中配置了它。我已经尝试加载一个插件,并使用loadAll()。 –
您也可以删除缓存文件,只是为了确保 – cornelb