title: PHP - Relative paths "require"
body: <p>My directory structure looks like this:  </p>
  
  <pre><code>blog -&gt; admin -&gt; index.php
  blog.php
  db.php
  functions.php
  </code></pre>
  
  <p>I have been trying to <code>include</code> (<code>require</code>, really) <code>blog.php</code> in the <code>admin/index.php</code>, but facing lots of errors. I'm following a PHP course, and the instructor does the same thing successfully.</p>
  
  <p>admin/index.php:</p>
  
  <pre><code>require "../blog.php";
  </code></pre>
  
  <p>which, in turn, requires two more files in its directory.</p>
  
  <pre><code>require "db.php";
  require "functions.php";
  </code></pre>