title: Going up two or three folders using dirname twice or three times
body: <p>Take a look at the code</p>
  
  <pre><code>$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
  echo dirname(dirname($link));
  </code></pre>
  
  <p>Question 1. Is it elegant to use dirname twice to go two levels up?</p>
  
  <p>Question 2. In case you want to go three levels up, would it be a good practise to use dirname three times?</p>