How do I return a custom error message when accessing a routing address that does not exist in thinkPHP?

now when you access a routing address that does not exist, an error page appears showing "the current access route is not defined".

how to set up a routing address that does not exist to return a specified content, such as returning a JSON, or jumping to a specified page?

clipboard.png

Php
Apr.29,2021
Menu