php smarty fetch,fetch()
email_body.tpl模板的内容:
Dear {$contact_info.name},
Welcome and thank you for signing up as a member of our user group.
Click on the link below to login with your user name
of '{$contact_info.username}' so you can post in our forums.
{$login_url}
List master
{textformat wrap=40}
This is some long-winded disclaimer text that would automatically get wrapped
at 40 characters. This helps make the text easier to read in mail programs that
do not wrap sentences for you.
{/textformat}
该PHP脚本使用了PHP的mail()函数。
// 从数据库或其他来源获取到$contact_info
$smarty->assign('contact_info',$contact_info);
$smarty->assign('login_url',"http://{$_SERVER['SERVER_NAME']}/login");
mail($contact_info['email'], 'Thank You', $smarty->fetch('email_body.tpl'));
?>
《新程序员》:云原生和全面数字化实践50位技术专家共同创作,文字、视频、音频交互阅读总结
以上是生活随笔为你收集整理的php smarty fetch,fetch()的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: php序列化中文,详解之php反序列化
- 下一篇: php两次访问时间,php – 检查当前