title: QNAP - PHP Script to List directories (Websites) / Web Development
body: <p>I have the following:</p>
  
  <ul>
  <li>QNAP server which has (MYSQL / PHP)</li>
  </ul>
  
  <p>The IP address of the server is <code>192.168.1.180</code></p>
  
  <p>What I am trying to do:</p>
  
  <ul>
  <li>To access <code>http://192.168.1.180</code> then it will show the PHP file which will have list of all the virtual hosts listed in the same directory.</li>
  </ul>
  
  <p>Example:</p>
  
  <pre><code> 1. http://192.168.1.180/index.php (Main page that shows the list of directories)
   2. http://192.168.1.180/dev-website-001 (some website)
   3. http://192.168.1.180/dev-my-shop (some website)
  </code></pre>
  
  <p>The idea of the script is that I only need to put in <code>192.168.1.180</code> and select the folder which is the website I am working on. And then I have click on the folder and I have the site up and going. </p>
  
  <p>Thanks</p>