How to use absolute path in twig functions

后端 未结 9 1090
情话喂你
情话喂你 2020-12-04 16:35

I have an application with Symfony2 (2.2). When I want to send a mail, I\'m having trouble with the paths, which are all relative paths and obviously aren\'t working inside

9条回答
  •  -上瘾入骨i
    2020-12-04 16:44

    From Symfony2 documentation: Absolute URLs for assets were introduced in Symfony 2.5.

    If you need absolute URLs for assets, you can set the third argument (or the absolute argument) to true:

    Example:

    Symfony!
    

提交回复
热议问题