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 – 检查当前