我需要在 PHP 上生成订单确认电子邮件。我有一个包含确认电子邮件的 php 文件(因为它有一些变量应该在加载到处理订单的主 php 时打印出来。它看起来像这样:
**orderConf.php**
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
</body>
Dear <?php echo $firstName." ".$lastName; ?> .....
.....
</body></html>
然后在处理订单的主 php 中,我有邮件函数,我在其中放置了这个变量: orderProcessing.php
$message = include ("orderConf.php");
这是正确的方法吗?或者我应该以不同的方式撰写我的确认电子邮件?
谢谢