问题
How do I call a helper function from a CakePHP component?
回答1:
App::import('helper', 'Upload');
$test = new UploadHelper();
pr($test->hi());
回答2:
use this
$this->controller->helpers[] = "helper name";
inside component class
来源:https://stackoverflow.com/questions/4944531/how-do-i-call-a-helper-function-from-a-cakephp-component