$content = $_POST['content']; echo str_replace("\n", "<br />", $content); 写入数据库效果 转载于:https://blog.51cto.com/jinliang/1603916