开发者

raw text storage vs text parsing (BBCODE(PHP))

开发者 https://www.devze.com 2023-01-21 10:13 出处:网络
Im making my little site where users can create blogs, and have studied publishing tools like wordpress and vbulletin.

Im making my little site where users can create blogs, and have studied publishing tools like wordpress and vbulletin.

When a user creates a post with BBcodes/mark up language, should i parse i开发者_开发知识库t into HTML and insert in db, and then only echo the text for the user, or should insert it with bbcode in the db, and let the php page parse it from bbcode to proper html? lets just say i have 2000 visitors at one given time, what is the best method? can it not be tough for the server if 2000 pages has to be loaded where 200kb of text needs to be formatted from bbcode to html


Always store your data unformatted. If you ever need to change the how the output looks in the future, it will be easy.

Your server will do just fine. It isn't about the number of pages, it is the number of concurrent users.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号