开发者

Cakephp missing helper file error

I'm getting below error...I'm not sure what this means as I have included helper file in the view file...

Missing Helper File

Error: The helper file track/views/helpers/re开发者_StackOverflowquest_handler.php can not be found or does not exist.

Error: Create the class below in file: track/views/helpers/request_handler.php

<?php
class RequestHandlerHelper extends AppHelper {

}
?>

If you can let me know what this means that would be appreciated!

Thank you. Jae


Unless you customized how your CakePHP works, this should apply to most cases:

Checklist

  1. Make sure the helper file is created in /app/views/helpers/request_handler.php
  2. Make sure the content of the request_handler.php looks like this:

    class RequestHandlerHelper extends AppHelper {
        var $name = 'RequestHandler';
    
        //bla....
    }
    
  3. Make sure in the controller that renders the view has the helper array included

    class FancyController extends AppController {
        var $name = 'Fancy';
        var $helpers = array('RequestHandler');
    
        //bla....
    }
    
  4. I think that's all :)

Cheers


you have to include the helpers in the controller (app_controller if you want the helper to be available for views of all controller)

var $helpers = array('Form', 'Html', 'YourHelper');


If you are using any version of CakePHP, just open the file core.php in the folder config and edit the line Configure::write('debug', 0); to Configure::write('debug', 2);

It will say the erro and how to create the file and where to put it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜