freelance84 Posted November 6, 2010 Share Posted November 6, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/217941-one-single-php-or-multiple-php-files/ Share on other sites More sharing options...
Yucky Posted November 6, 2010 Share Posted November 6, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/217941-one-single-php-or-multiple-php-files/#findComment-1131186 Share on other sites More sharing options...
freelance84 Posted November 6, 2010 Author Share Posted November 6, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/217941-one-single-php-or-multiple-php-files/#findComment-1131195 Share on other sites More sharing options...
Yucky Posted November 7, 2010 Share Posted November 7, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/217941-one-single-php-or-multiple-php-files/#findComment-1131246 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.