문제

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() }}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top