title: How to include PHP files that require an absolute path?
body: <p>I have a directory structure like the following;</p>
  
  <blockquote>
    <p>script.php</p>
    
    <p>inc/include1.php<br/>
    inc/include2.php</p>
    
    <p>objects/object1.php<br/>
    objects/object2.php</p>
    
    <p>soap/soap.php</p>
  </blockquote>
  
  <p>Now, I use those objects in both <code>script.php</code> and <code>/soap/soap.php</code>, I could move them, but I want the directory structure like that for a specific reason. When executing <code>script.php</code> the include path is <code>inc/include.php</code> and when executing <code>/soap/soap.php</code> it's <code>../inc</code>, absolute paths work, <code>/mnt/webdev/[project name]/inc/include1.php...</code> But it's an ugly solution if I ever want to move the directory to a different location.</p>
  
  <p>So is there a way to use relative paths, or a way to programmatically generate the <code>"/mnt/webdev/[project name]/"</code>?</p>