what is the best way to store long text entered in the website using php
I would like to know what is the the best way to store the information given by the user. Say the cus开发者_Python百科tomer has entered 'n' number of lines.
Which one is the best way to store the text, either to the DB or to the file. Also which is the best way to retrive using PHP.
Thanks, Lokesh.
Using a database is the best way. It is secure. Retrieving and storing are easy.
Your question is dependent on many variables and is a bit objective. However, I find that saving to a database is better for maintainability. Although you can search, filter, etc. from a file - it's a bit more native and simpler through a DB api.
精彩评论