Mindaugas Posted January 15, 2011 Share Posted January 15, 2011 Hello all I was wondering how to make loading cost (mb) lower and loading speed faster? Is it when all site is almost in 1 file with ids and etc ? or at separate files? thank you :} Quote Link to comment https://forums.phpfreaks.com/topic/224521-php-site-in-one-file/ Share on other sites More sharing options...
trq Posted January 15, 2011 Share Posted January 15, 2011 Putting your site all in one file is not going to make any difference to performance if that is your question. Quote Link to comment https://forums.phpfreaks.com/topic/224521-php-site-in-one-file/#findComment-1159978 Share on other sites More sharing options...
denno020 Posted January 16, 2011 Share Posted January 16, 2011 If all of the site is in one file, it could almost make it slower. That file will obviously get bigger as more code is added to it, and therefore a larger file size will equal slower download. If you put your website across multiple files, then only the files that need to be loaded for that page will be loaded, and could mean it's quicker? I don't know if this is true in practice, but I thought it's something to think about.. Denno Quote Link to comment https://forums.phpfreaks.com/topic/224521-php-site-in-one-file/#findComment-1160026 Share on other sites More sharing options...
nomadsoul Posted January 16, 2011 Share Posted January 16, 2011 I have one huge php file - a php jukebox that serves audio files. It is great but when I want to tweak it, my version of filezilla won't up-download it. So, a large file can cause FTP trouble I think. Quote Link to comment https://forums.phpfreaks.com/topic/224521-php-site-in-one-file/#findComment-1160033 Share on other sites More sharing options...
Mindaugas Posted January 16, 2011 Author Share Posted January 16, 2011 Thank you all for answers Quote Link to comment https://forums.phpfreaks.com/topic/224521-php-site-in-one-file/#findComment-1160212 Share on other sites More sharing options...
Adam Posted January 16, 2011 Share Posted January 16, 2011 However you store the files internally will have (next to) no noticeable difference to the end-user; they still receive the same HTML content back from the server. If you had a lot of users accessing the website though there may be a slight bottle neck in reading the file, but the main problem you'll have would be in maintaining it. Trying to find a specific point or line or something could be a nightmare, but could be avoided by using a proper file structure. Quote Link to comment https://forums.phpfreaks.com/topic/224521-php-site-in-one-file/#findComment-1160263 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.