PHP电子邮件中的换行符问题
我试图让消息在客户键入时显示换行符,但在每行之间我都会看到PHP电子邮件中的换行符问题,php,Php,我试图让消息在客户键入时显示换行符,但在每行之间我都会看到/r/n。我还想要$body.=$\u会话['username']显示在单独的行上 我曾尝试用这个例子:去解决,但都没有成功 PHP: HTML格式: <form action="notification.php" method="Post" class="rl"> <div> <label for="message" class="fixedwidth">Message<
/r/n
。我还想要$body.=$\u会话['username']代码>显示在单独的行上
我曾尝试用这个例子:去解决,但都没有成功
PHP:
HTML格式:
<form action="notification.php" method="Post" class="rl">
<div>
<label for="message" class="fixedwidth">Message</label>
<textarea name="message" rows="7" cols="40" id="message"></textarea>
</div>
<div class="buttonarea">
<p>
<input type="submit" name="notify" value="Notify"></p>
</div>
</p>
</form>
消息
您可以尝试使用PHP\u EOL
常量:
$body .= $_SESSION['username'].PHP_EOL;
$body .= $_SESSION['username'].PHP_EOL;