Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make custom error pages in CakePHP 2.0

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 525
    Comment on it

    Hello reader! If you want to set a custom error webpage for your whole cakePHP project you can set this page at

    /views/layouts/default.ctp as layout for these error pages like 404/ page not found

    To customize it and set your own message, open the app_error.php from location /app/app_error.php and with the following contents create a call to .ctp fille:

    class AppError extends ErrorHandler {
    
     function _outputMessage($template) {
      $this->controller->layout = 'error_template'; 
      parent::_outputMessage($template);
     }
    
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: