只要帖子之间有空格,它就会显示rn
。下面是我读取插入数据的方式:
$content_of_post_original = mysql_real_escape_string($_POST['post_content']);
$content_of_post = stripslashes($content_of_post_original);
然后打印:
echo $show['post_content']
'r'n
表示新行。你的斜杠正在删除这个,只是回显rn
而不是一个新的行。
查看:http://php.net/manual/en/function.nl2br.php