【问题标题】:CakePHP DebugKit Plugin Toolbar doesn't appear after Install安装后 CakePHP DebugKit 插件工具栏不出现
【发布时间】:2014-03-18 22:56:10
【问题描述】:

您好,提前感谢您的帮助!多次尝试安装 CakePHP 的 DebugKit 插件失败

尝试的步骤: 1. 下载并解压 debug_kit (https://github.com/cakephp/debug_kit) 2. 将文件重命名为“DebugKit”并移至 /webroot/cakephp/plugins(使其位于 plugins 文件夹中)。 3. 对相应的文件进行如下修改。 (我已经两次和三次检查了这些)

# Installation

* Clone/Copy the files in this directory into `app/Plugin/DebugKit`
* Ensure the plugin is loaded in `app/Config/bootstrap.php` by calling `CakePlugin::load('DebugKit');`
* Include the toolbar component in your `app/Controller/AppController.php`:
```php
class AppController extends Controller {
         public $components = array('DebugKit.Toolbar');
}
```
* Set `Configure::write('debug', 1);` in `app/Config/core.php`.
* Make sure to remove the 'sql_dump' element from your layout (usually
  `app/View/Layouts/default.ctp` if you want to experience the awesome that is
  the debug kit SQL log.

当我到达我的 localhost/cakephp 时,我看到了其他通知,并且我已经配置了其他所有内容,以便它们显示为绿色。然而,Cakephp 甚至没有看到我正在尝试使用 DebugKit 插件并且工具栏没有显示。

我是 CakePHP 的新手,并且一直在学习教程以正确设置所有内容。我认为 DebugKit 在帮助我理解 CakePHP 方面会非常有帮助。我已经阅读了几个教程并搜索了互联网,但我无法让它工作。如果您有任何想法,请告诉我!

注意: CakePHP 2.4.6 版 DebugKit 2.2.1(也尝试过更新版本) 在 Ubuntu 12.04 上安装 LAMP

【问题讨论】:

  • 您是否更改了插件中文件夹的权限?
  • @Dezigo,是的,这是我曾经尝试安装它的教程之一,还有来自 Lynda.com 和其他一些网站的教程。
  • @skywalker,感谢您的建议。我检查了插件中文件夹的权限,它们都设置为 775,这应该足够了。我尝试将它们更改为 777 只是为了看看,但不幸的是它没有改变任何东西。
  • 尝试在bootstrap.php中添加:CakePlugin::load('DebugKit');

标签: cakephp plugins installation toolbar


【解决方案1】:
  1. 在 cakePHP 根目录 > plugins' 文件夹中,应该是 DebugKit 所在的位置。
  2. 然后,您需要通过在引导程序中加载该工具包,让每个人都可以使用它。在 app > config > bootstrap.php 添加这一行;
CakePlugin::load('DebugKit');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-27
    • 1970-01-01
    • 2013-02-13
    • 1970-01-01
    相关资源
    最近更新 更多