Include a PHP file in a Twig template
문제
I need to include a PHP script in my twig template. Is this possible?
해결책
You would not want to do that. What you can do is to create a twig extension and run your PHP code there. In your template you would just call your extension:
{{ myExtension() }}
제휴하지 않습니다 StackOverflow