title: Find htdocs path, no matter where file is stored
body: <p>How can I find my htdocs directory.</p>
  
  <p>When I execute the following command:</p>
  
  <pre><code>echo  dirname(__FILE__);
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>/var/www/myexample.com/htdocs/required/css
  </code></pre>
  
  <p>I want to find path till /htdocs, but I don't want to hard-code the things</p>
  
  <p>I know I can use:</p>
  
  <pre><code>dirname(dirname(dirname(__FILE__)))
  </code></pre>
  
  <p>But, that will work if the current file is in "css" directory. If I will move to some other directory inside "css" directory, then it will not work.</p>
  
  <p>Any solution for this?</p>