title: PHP: Include library in files in different directories
body: <p>My project tree:</p>
  
  <p><img src="https://i.stack.imgur.com/P1xBo.png" alt="enter image description here"></p>
  
  <p>The library <strong>LibB</strong> is used in both <strong>AJAX</strong> and <strong>fileA</strong>, so I have respectively, in each file:</p>
  
  <pre><code>include_once "../Lib/LibB.txt"
  include_once "Lib/LibB.txt"
  </code></pre>
  
  <p>The problem is that <strong>LibB</strong> depends on <strong>LibA</strong>, and whether I put an include that works for <strong>AJAX</strong> or that works for <strong>fileA</strong>:</p>
  
  <pre><code> include_once "../LibA.txt"
   include_once "LibA.txt"
  </code></pre>
  
  <p>Is there a code that will work for both files?</p>