How do I use relative paths for PHP includes?
<p>I'm having trouble learning relative paths for PHP includes.</p>

<p>Trying to get an include statement in index.php to find footer.php in the includes folder in _assets two folders up.</p>

<p>From what I read here on SO, I would think it would be:  </p>

<pre><code>include('../../_assets/includes/footer.php');
</code></pre>

<p>I'd rather use an absolute path, but can't get that to work either.</p>

<hr>

<p>Figured out the absolute URL path.</p>

<pre><code>echo file_get_contents('http://www.mysite.com/_assets/includes/footer.php');
</code></pre>

<p>Works perfectly.</p>
