K
K
knowledge2018-02-01 18:36:54
PHP
knowledge, 2018-02-01 18:36:54

In the MVC model, do you need to display your error pages through a special ErrorController?

Let's say I catch an access error (403), so I need to run ErrorController->error403Action() ???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
novrm, 2018-02-01
@novrm

403 is not an error in the code - it is a restriction in access rights.
As an option - you can just redirect to another page - for example, to the authorization page ...
This only requires a view, not a controller.
The wiki suggests another option:
800px-%D0%91%D1%80%D0%B0%D1%83%D0%B7%D0%

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question