Creating pages in symfony 2 - template exception

I try to run my first template in symfony 2 according to “Optional step 3: create a template” from the book, but I get an exception: Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for C:\Server\Apache2\htdocs\SymfonyProject\src\Acme\HelloBundle/Resources/views/Default/index.html.twig in C:\Server\Apache2\htdocs\SymfonyProject\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Templating\Loader\FilesystemLoader.php line 68

The previous steps from the book work, so I have no idea what is wrong.

+4
source share
1 answer

If you delete an existing twig template, the framework will throw the error you described. You need to clear the cache, even in a dev environment: php app/console cache:clear

+5
source

Source: https://habr.com/ru/post/1382784/


All Articles