Site root for backend and frontend
<p>Let's say that I have this website file root structure:</p>

<ul>
<li>frontend /home/username/public_html/</li>
<li>backend /home/username/public_html/admin/</li>
</ul>

<p>In frontend folder there is a file called config.php. In this file I get the site root of my website like this:</p>

<pre><code>define('ROOT', dirname(__FILE__));
</code></pre>

<p>This file is also included in both index files (index.php) in frontend and backend. But for backend, the root is /home/username/public_html/admin/, which should actually be /home/username/public_html/. How can I do this, in one line, in config.php?</p>

<p><strong>LE:</strong></p>

<p>Demo code <a href="http://pastebin.com/LGrrJzaV" rel="nofollow">http://pastebin.com/LGrrJzaV</a></p>
