Jump to content

Recommended Posts

 

What is easier on the server:

 

1. Lots of users all using one php file doing lots of different things

 

2. Lots of users using a series of seperate php files all doing the things as in point one.

 

Or.. does it not really make any difference either way?

Link to comment
https://forums.phpfreaks.com/topic/217941-one-single-php-or-multiple-php-files/
Share on other sites

Are you talking about includes here or totally different scripts?

 

If the former, it'd be slightly quicker to have everything in one file. However, you'll be using more memory if you're including code that isn't relevant to the action being performed.

 

If the latter, I doubt it makes any difference whatsoever.

Well,

 

At the moment i have designed my index.php to print one html page, its basically template which then inputs one of the following at any one time:

.main index cover page with login form

.send reminder of details page

.a simple contact us form with a text area

.registration form (but not the processing php of the said form)

 

I know the above isn't particular heavy but if it was, would it be better to split the 4 tasks up into 4 seperate php scripts?

As it doesn't sound like a big site, you should look at using a single include file that would contain your functions.

 

I don't think including business logic (essentially the code that makes your site work) in your presentation (HTML/CSS) is ever the right thing to do. :)

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.