【问题标题】:Brownie.panel component in cake php蛋糕 php 中的 Brownie.panel 组件
【发布时间】:2013-12-20 23:57:44
【问题描述】:

我已经在 cake php 中安装了 browine 插件。但它显示出问题。请建议。

缺少组件错误:找不到 Brownie.panelComponent。 错误:在文件中创建下面的类 panelComponent: C:\xampp\htdocs\newcakefood\app\Plugin\Brownie\Controller\Component\panelComponent.php

<?php
class panelComponent extends Component {

}

注意:如果要自定义此错误消息,请创建 app\View\Errors\missing_component.ctp 堆栈跟踪 CORE\Cake\Controller\ComponentCollection.php 第 53 行 → ComponentCollection->加载(字符串,数组) CORE\Cake\Controller\Controller.php 第 639 行 → ComponentCollection->init(PagesController) CORE\Cake\Routing\Dispatcher.php 第 183 行 → Controller->constructClasses() CORE\Cake\Routing\Dispatcher.php 行 162→调度程序->_invoke(PagesController,CakeRequest,CakeResponse) APP\webroot\index.php 第 111 行 → Dispatcher->dispatch(CakeRequest, 蛋糕响应)

【问题讨论】:

    标签: php cakephp


    【解决方案1】:

    阅读错误信息:panelComponent.类名和文件名区分大小写,应该是大写的P,Panel。检查加载它的组件数组。

    【讨论】:

    • 这是正确的原因,但类名(即 php)are not case sensitive.
    • 是的,但是当通过自动加载器加载时,它们基本上会区分大小写,因为自动加载器会尝试按照约定将它们映射到文件名。
    • 我不同意(显然)但这个说法实际上是错误的:Class [names] are case sensitive
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多