开发者

How do I call a helper function from a CakePHP component?

开发者 https://www.devze.com 2023-02-09 17:47 出处:网络
How do I call a helper function from a开发者_运维技巧 CakePHP component?App::import(\'helper\', \'Upload\');

How do I call a helper function from a开发者_运维技巧 CakePHP component?


App::import('helper', 'Upload');
$test = new UploadHelper();
pr($test->hi());


use this

$this->controller->helpers[] = "helper name"; 

inside component class

0

精彩评论

暂无评论...
验证码 换一张
取 消