Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/273.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP电子邮件中的换行符问题_Php - Fatal编程技术网

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;