title: PHP dirname returns symlink path
body: <p>Say I have a symlink from <code>'/one/directory/'</code> to <code>'/two/directory/'</code>.</p>
  
  <p>If I <code>echo dirname(dirname(\__FILE__))</code>, it returns <code>'/one/directory/'</code>.</p>
  
  <p>What is the best method to return <code>'/two/directory'</code>?</p>
  
  <p><strong>Example usage:</strong></p>
  
  <p>Vhost <code>'example.com'</code> pointing to `'/two/directory'</p>
  
  <blockquote>
    <p>example.com/hello_world.php</p>
  
  <pre><code>&lt;?php 
      echo dirname(dirname(__FILE__));
  ?&gt;
  </code></pre>
  </blockquote>
  
  <p><strong>Returns:</strong>  <code>'/one/directory'</code></p>
  
  <p><strong>Expected results:</strong> <code>'/two/directory'</code></p>