Possible Duplicate:
Why is require_once so bad to use?
I'm trying to speed up a site (cms) I am developing, and it's a lot of code. I have a lot of class files (about 10) and a few function files, all of which are in the config.php file. On every single page I use require_once("config.php");
which then includes all my class files.
Here's my question: Most of my class files are made for individual pages (such as viewArticle.class.php is only used on the page to display the article), does it slow down my script to still have these files included in the config.php if they are not being used?
I just wanted to see if anyone knew the exact answer or had any experience before I spend all my time coming up with a solution so only the files that need to be used are ran.
Basically, does it slow down my script to include class files if they are not going to be used?
Thanks