我已經把以下文件如何在symfony2中自定義403錯誤異常?
/app/Resources/TwigBundle/views/Exception
error.html.twig, error.json.twig , error403.json.twig, error404.json.twig
但我仍無法得到這些模板
我想爲拒絕訪問異常
Token does not have the required roles.
403 Forbidden - AccessDeniedHttpException
1 linked Exception:
AccessDeniedException »
你督促環境或開發環境下嘗試呢? –
卡洛斯猜測,這些自定義頁面只顯示在PROD環境中! – AlterPHP