我正在symfony2中制作自定义404页面。 我已经有了一个自定义页面,但是当我扩展base.html.twig时,我收到了这个错误:
Fatal error: Uncaught exception 'Symfony\Component\Routing\Exception\ResourceNotFoundException' in C:\htdocs\pdb\app\cache\prod\appProdUrlMatcher.php:267 Stack trace:
#0 C:\htdocs\pdb\app\cache\prod\classes.php(1361): appProdUrlMatcher->match('/test23')
#1 C:\htdocs\pdb\app\cache\prod\classes.php(1254): Symfony\Component\Routing\Matcher\UrlMatcher->matchRequest(Object(Symfony\Component\HttpFoundation\Request))
#2 C:\htdocs\pdb\app\cache\prod\classes.php(1961): Symfony\Component\Routing\Router->matchRequest(Object(Symfony\Component\HttpFoundation\Request))
#3 [internal function]: Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#4 C:\htdocs\pdb\app\cache\prod\classes.php(1747): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher)) in C:\htdocs\pdb\app\cache\prod\classes.php on line 1977
我希望有人可以帮助我!