开发者

Get physical and virtual subdirectories of the document root in PHP

开发者 https://www.devze.com 2023-02-19 14:57 出处:网络
I have a set of Web applications, all of which are hosted in a single Apache instance: /* / /WebApp1 /WebApp2

I have a set of Web applications, all of which are hosted in a single Apache instance:

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

I want to make a general home page (/index.php), 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 physical and virtual subdirectories of the document root.


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 we开发者_StackOverflow社区bsite must also run on Windows Server 2008.


Use glob() on your document root directory ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号