使用php的编码功能-实例调用(3)

作者:袖梨 2022-07-02
include_once("mime.inc");
$mm = new MIME();
$to = "[email protected]";
$subject = $mm->encode("商城","gb2312"); // 编码
$msg = "注册会员成功
";
$msg .= "会员名:wayne
";
$msg .= "密码:wayne";
$headers = "From: [email protected] Content-Type: text/html; charset=gb2312 ";
mail("$to", "$subject", "$msg", "$headers");    
?>
进行编码以后,中文问题解决。

相关文章

精彩推荐