PHP - Avoid all the includes for every page?
<p>I have a user authentication system that I am currently writing. Problem is, I don't want to have to include class x,y,z,etc for every page that I want to use that class for. For example, here is the index page:</p>

<pre><code>///////// I would like to not have to include all these files everytime////////

include_once '../privateFiles/includes/config/config.php';

include_once CLASSES.'\GeneratePage.php';

include_once DB.'\Db.php';

include_once HELPERS.'\HelperLibraryUser.php'; //calls on user class
//////////////////////////////////////////////////////////////////////////////

$html = new GeneratePage();
$helper = new HelperLibraryUser("username","password","email");

$html-&gt;addHeader('Home Page','');

$html-&gt;addBody('homePage',
'&lt;p&gt;This is the main body of the page&lt;/p&gt;'.
$helper-&gt;getUserEmail().'&lt;br/&gt;'.
$helper-&gt;doesUserExists());

$html-&gt;addFooter("Copyright goes here");

echo $html-&gt;getPage();
</code></pre>

<p>As you can see, there are a few files that I need to include on every page, and the more classes I add, the more files I will have to include. How do I avoid this?</p>
