Slim 3 - How to add 404 Template?
问题 In Slim 2, I can over write the default 404 page easily, // @ref: http://help.slimframework.com/discussions/problems/4400-templatespath-doesnt-change $app->notFound(function () use ($app) { $view = $app->view(); $view->setTemplatesDirectory('./public/template/'); $app->render('404.html'); }); But in Slim 3, // ref: http://www.slimframework.com/docs/handlers/not-found.html //Override the default Not Found Handler $container['notFoundHandler'] = function ($c) { return function ($request,