I'm building a blog, I have done to build the replies system and now I'm working on the "posts" system. the replies was built to be saved in a database table. So I wonder if the posts should be saved in a table too or in text files. And generally, what do you prefer and do more in you'r projects?
问问题
91 次
2 回答
2
Save them in your database.
By doing this you will obtain consistency (all blog-related data is in a database you can easily backup/restore) and functionality (easier to search, retrieve, process, etc).
于 2013-03-29T18:58:24.877 回答
0
If you can handle the file saving, traversing and retrieve the data, then use file; otherwise, use a database.
于 2013-03-29T18:58:03.333 回答