title: file_get_contents with relative path
body: <p>I have the following directory structure.</p>
  
  <pre><code>/var/www/base/controller/detail.php
  /var/www/base/validate/edit.json
  /var/www/html
  </code></pre>
  
  <p>Within <code>/var/www/base/controller/detail.php</code>, how do I use <code>file_get_contents()</code> with a relative path to read <code>/var/www/base/validate/edit.json</code>?  I've tried the following:</p>
  
  <pre><code>//failed to open stream: No such file or directory (error no: 2)
  $json=file_get_contents('detail.php');
  
  //No error, but I don't want this file and was just testing
  $json=file_get_contents('detail.php', FILE_USE_INCLUDE_PATH);
  
  //failed to open stream: No such file or directory (error no: 2)
  $json=file_get_contents('./validate/edit.json', FILE_USE_INCLUDE_PATH);
  //failed to open stream: No such file or directory (error no: 2)
  $json=file_get_contents('../validate/edit.json', FILE_USE_INCLUDE_PATH);
  //failed to open stream: No such file or directory (error no: 2)
  $json=file_get_contents('././validate/edit.json', FILE_USE_INCLUDE_PATH);
  //failed to open stream: No such file or directory (error no: 2)
  $json=file_get_contents('../../validate/edit.json', FILE_USE_INCLUDE_PATH);
  
  //This works, but I want to use a relative path
  $json=file_get_contents(dirname(dirname(__FILE__)).'/validate/edit.json');
  </code></pre>