Jump to content

PHP Forum: 1 huge file, or many small files?


JoaoJ

Recommended Posts

Hi,

 

when making a forum, is there any reason why/whynot i should use just 1 single file or why/whynot should i split all the pages/sections/topics in individual files?

 

Thanks for any info on this.

Link to comment
Share on other sites

Explain more what you mean by "file"?  Do you mean one enormous 10mb PHP file that runs the entire forum?  Or are you talking about using files instead of databases?

 

No, no, one file only with the PHP forum, then the DB on the side :)

Actually, like this own forum uses, just one file, named index.php, all actions are by URL.

That, agaisnt one file for sections, one for topics, one for posts, one for posting, so on...

 

Although the way i plan it (small forum, not many features) would not get to 10Mb or even close :P

 

Just wanting to figure out reasons why i could use such a way, or not use that way at all. I'm not very good in the tech side of server/db.

Link to comment
Share on other sites

This site is powered by hundreds, if not thousands of files.  Index.php, if it exists at all, is a router file which includes the appropriate files for what you're attempting to do.

 

Oh, crap, you are right, didnt noticed it was SMF :P

In any case, i did a "sketch" of the forum, and due to the simplicity i want, it was just one file, and not that big (not that small either :P ).

 

Just wondering if, server side, was best to use just that one file, or split it in a few.

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.