Including many files or just one file
<p>Setting up a project structure; I am thinking is it better to have somewhat of a "bootstrap.php" file that include and setup everything such as database connection, session management, libraries, error handling. Or just singulary include the file needed for the moment? (Which would need to prior the order of including, etcetera).</p>

<p>Alternative 1:</p>

<p>index.php</p>

<pre><code>&lt;?php

include 'bootstrap.php';

//session... database up and ready to be used...
</code></pre>

<p>Alternative 2:</p>

<p>index.php</p>

<pre><code>    &lt;?php
include 'session.php';
include 'database.php';
include 'errorhandling.php';
//now use database...
</code></pre>
