dqx24298 2016-06-27 11:22
浏览 320
已采纳

是否可以将Smarty模板转换为HTML而不将其输出到页面?

The display method in Smarty converts the Smarty template to HTML, and then outputs that to the page.

Is there any way that I can convert a Smarty template to HTML, and save the contents of such in a variable?

I want to use Smarty to render an email template, but then obviously send that email to a user.

  • 写回答

2条回答 默认 最新

  • dongzouche9108 2016-06-27 11:31
    关注

    Yes, there is a fetch() method for exactly this purpose. It takes all the same parameters as the display() method and the two are cross-referenced in the documentation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?