更改Cakephp中错误页的布局

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了更改Cakephp中错误页的布局相关的知识,希望对你有一定的参考价值。

  1. // Create an error.php file in your /app folder with the following code:
  2.  
  3. <?php
  4.  
  5. class AppError extends ErrorHandler {
  6.  
  7. function error404($params) {
  8. $this->controller->layout = "error";
  9. parent::error404($params);
  10. }
  11.  
  12. }
  13.  
  14. ?>

以上是关于更改Cakephp中错误页的布局的主要内容,如果未能解决你的问题,请参考以下文章