Relative path to config file in PHP project
<p>I'm new to PHP. I'm developing a new PHP website. My website folder structure is as below, </p>

<pre><code>-SystemRoot
    +Code
    +Data_Access
    -Public_HTML
        +css
        +js
        +Templates
    -resources
        config.php
</code></pre>

<p>There I have a config file in resources directory, I need to include <code>config.php</code> in most of other php pages in various directories. So I have to specify the path to config file differently in different pages like,</p>

<pre><code>include_once '../resources/config.php';
include_once '../../resources/config.php';
</code></pre>

<p>Is there a way to overcome this &amp; use a common (relative) path to <code>config.php</code> that can be used in eny folder path within the project? </p>

<p>What is the common/best practice to include classes in php projects?</p>
