【问题标题】:Cake php Missing helper, working on local but not on remoteCake php缺少助手,在本地工作但不在远程
【发布时间】:2015-03-17 23:46:56
【问题描述】:

面对这个问题,网上提到的解决方案都没有实际帮助: 使用 Cake php,我的所有项目在本地 Windows 机器上都可以正常工作,但不能在 linux 服务器上工作,我遇到了这个错误:

Missing Helper
Error: HTMLHelper could not be found.

Error: Create the class HTMLHelper below in file: app/View/Helper/HTMLHelper.php

<?php
class HTMLHelper extends AppHelper {

}

最终我发现我没有遗漏任何帮助程序,但问题在于 ctp 文件以及 Linux 和 Windows 读取该文件的不同方式。我会在下面写答案

【问题讨论】:

    标签: php linux windows cakephp


    【解决方案1】:

    解决这个问题的方法是改变这些:

    $this->HTML->script
    $this->html->script
    

    到这里:

    $this->Html->script
    

    【讨论】:

      【解决方案2】:

      我有同样的问题,但仍然有错误。就我而言,我需要改变

      $this-&gt;form 到 $this-&gt;Form

      $this-&gt;url 到 $this-&gt;Url

      有些元素的命名有误。

      Linux 区分大小写,有些方法需要命名为 Cake docs,甚至 windows 也可以

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-01-27
        • 2021-07-14
        • 2015-09-12
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多