Jump to content

Two ways to do it, which one is better?


IMakeLousyCode

Recommended Posts

Hi!

I would like to know the experts opinion about a php script fetching news  ;D

Ok, so on this site it is possible to add, modify and delete news to be displayed on the website. But which way is the most efficient and quick way to store these news? In separate text files -> news_1.txt, news_2.txt ... which then is opened and read, or in one file only news separated maybe like
<id=1>
news
</id>

Does it really differ or matter concerning the dowloading time of the page?

Thanks for help
Link to comment
https://forums.phpfreaks.com/topic/22958-two-ways-to-do-it-which-one-is-better/
Share on other sites

The number of text files you end up with is really of no concern as long as there is a file management system.  The first option is the better option in my opinion.

What will happen when there are lots of articles for the site and the single text file grows to be very large?  You will have a lot of text parsing to go through to find the specific article you want which will not a fast website make.

What I really have to wonder is why aren't you using MySQL?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.