CakePHP custom helper works locally but not on ser

2019-05-29 01:36发布

问题:

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)

回答1:

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



回答2:

Apologies, it was an issue with git.