how to use config file from a subdirectory while it is been kept at root directory in PHP
<p>I am developing a web application. contents are:</p>

<ul>
<li>root dir (/var/www/)</li>
</ul>

<p><strong>config.php</strong></p>

<p>index.php</p>

<p>details.php</p>

<ul>
<li>admin dir (/var/www/admin)</li>
</ul>

<p>admin.php</p>

<p>I have included config.php file into index.php, details.php in root directory using require_once('config.php') as this file contains database passwords, styles, images directory paths..</p>

<p>how can i include that config files in my admin/admin.php file so that one config file can be used in anywhere(even in subdirectories) of my web application. Will it make any difference for the value of <code>define('APP_BASE_PATH', dirname(__FILE__));</code> when same config file is used by all files in the web application.</p>

<p>if i am wrong somewhere then please get me right.</p>
