CakePHP custom helper works locally but not on ser

2019-05-29 01:41发布

locally all is well. but when i moved my app to my server i got an error because cake didn't recognize my custom helper.

the error for my helper 'Halp' was

    Undefined property: View::$Halp

it is declared inside of my app_controller.php file like:

    var $helpers = array('Time','Halp','FileUpload.FileUpload','Html','Ajax', 'Form', 'Session','Javascript','Js' => array('Jquery'));

and located at:

app/views/helpers/halp.php

It works fine on my local MAMP setup

(using latest clone of 1.3)

2条回答
地球回转人心会变
2楼-- · 2019-05-29 02:20

In the view code where you are trying to use the helper, are you using $this->Halp->xxx or $Halp->xxx ?

查看更多
我只想做你的唯一
3楼-- · 2019-05-29 02:32

Apologies, it was an issue with git.

查看更多
登录 后发表回答