前端 - 如何存长篇文章到数据库mysql,然后是有格式的,然后,再取出来也是有格式的?
怪我咯
怪我咯 2017-04-17 14:27:45
0
4
588

如何存长篇文章到数据库mysql,然后是有格式的,然后,再取出来也是有格式的?

也就是说,一般的网站的文章的格式,是如何存和取的,才显得可观一点??

在后端,写编辑文章写入数据库的功能的时候,这块怎么处理??

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(4)
小葫芦

The simplest way is to filter the articles and store them in the database, and then parse them when they are taken out.

小葫芦

Is the questioner overly concerned?
Using mysql’s text type to save rich text, no formatting problems were found.

Let’s try it.

迷茫

Baidu has that ueditor link: http://ueditor.baidu.com/website/
Use this directly to render to the front-end page. After filling in the information, the back-end directly inserts it into the database. The corresponding article fields in the database use text. That's it.
When you take it out, some frames come with filtering html tags. You can just choose not to filter them at that time.

小葫芦

Save the large text data with html format into the field of text data type, and then process it on the front end

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!