0
CakePHP的自定義錯誤頁我有這樣的創建:對所有錯誤
<?php
class AppExceptionHandler
{
public static function handle($error)
{
$this->controller->redirect('www.google.com');
//echo 'Oh noes! ' . $error->getMessage();
// ...
}
// ...
}
?>
回聲將輸出不錯,但我怎麼使用佈局或查看?我不斷收到這個埃羅:
Fatal error: Using $this when not in object context in ...
可能重複:[CakePHP的AppError擴展功能(http://stackoverflow.com/questions/ 5754723/cakephp-apperror-extend-functions) – rlcabral