Where can I store a novel website novel?

Source: Internet
Author: User
For example, if I use php to create a novel, where should I put the specific novel content? Is it in the database or directly written into the hard disk and then the path Association in the database? For example, if I use php to create a novel, where should I put the specific novel content? Is it in the database or directly written into the hard disk and then the path Association in the database?

Reply content:

For example, if I use php to create a novel, where should I put the specific novel content? Is it in the database or directly written into the hard disk and then the path Association in the database?

I think it is better to put it in a local file. On the one hand, you can easily create an index and search for it. On the other hand, you can store data in a distributed manner without considering the problems caused by table sharding.
If it is directly stored in the database, it is very inefficient to put the novels of big points into a field, especially in full-text search.

Both are better.

Stored in the database for convenient management, re-editing, search, etc.

Put local files to facilitate direct download

If you do not want to provide direct download services, you can only store them in the database.

However, it is best to do a good job of caching

In my opinion, when I put files on a service provider that provides cloud storage, the database only provides some necessary information and stores a small amount of data, such as the title, type, and author. If you want to provide online reading, it is recommended that you refer to the relevant online reading materials, generally through a variety of plug-ins, may also include some file format conversion, in order to achieve better results.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.