Get physical and virtual subdirectories of the document root in PHP
<p>I have a set of Web applications, all of which are hosted in a single Apache instance:</p>

<pre><code>/*
/
  /WebApp1
  /WebApp2
  /...
  /Common            not a Web application, just a set of utilities!
*/
</code></pre>

<p>I want to make a general home page (<code>/index.php</code>), which basically displays the list of Web applications available. So, since PHP is my server scripting language of choice, I would like to know if there is a PHP function I can use to retrieve an enumerable collection of the <strong>physical and virtual subdirectories</strong> of the document root.</p>

<hr>

<p>Additional info: I don't know if it's necessary to specify this, but my Web applications run on Windows servers. My development machine runs Windows 7 x86 Ultimate; the test server runs Windows Server 2003; the website must also run on Windows Server 2008.</p>
