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
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.