title: ABSPATH or __FILE__?
body: <p>Can someone tell me if either of these two methods has an advantage over the other and why?</p>
  
  <p><code>$mydir = ABSPATH.'/wp-content/themes/mytheme/images';</code></p>
  
  <p><code>$mydir = dirname(__FILE__).'/images';</code></p>
  
  <p>They can both be used to obtain and absolute path to the images directory of "mytheme" regardless of structure of whether wordpress is installed on the root directory or in a subdirectory off the root. In both cases, they are being called from the functions.php file which is located under the "mytheme" folder.</p>