How to get grandparent directory with PHP
<p>I have a following directory structure.</p>

<pre><code>-webshop
   -controllers
      -webshop.php
</code></pre>

<p>In webshop.php I want to get webshop which is the grandparent of this file.</p>

<p>If I use the following I think I get 'controllers'.</p>

<pre><code>echo basename(dirname(__FILE__)); // this will get controllers
</code></pre>

<p>How can I get the grandparent directory?</p>

<p>Thanks in advance.</p>
