title: require_once and include problems php
body: <p>Somehow, I cannot include the file I want, neither using <code>require_once</code>, nor <code>include</code>. The file I want to include is in the same directory as the file in which I want to include it. I tried every combination, but still does not work.</p>
  
  <p>The error I get trying to use <code>require_once</code></p>
  
  <blockquote>
    <p>Warning: require_once(D:\PROJEKAT\wamp\www\Eif\db_connect.php): failed to open stream: No such file or directory in D:\PROJEKAT\wamp\www\Eif\create_user.php</p>
  </blockquote>
  
  <p>I first tried with </p>
  
  <pre><code>require_once '/db_connect.php'
  </code></pre>
  
  <p>then I used </p>
  
  <pre><code>require_once '\db_connect.php' cause I realized that I have to use \ in windows
  </code></pre>
  
  <p>Then tried</p>
  
  <pre><code>require_once __DIR__ . '\db_connect.php'
  </code></pre>
  
  <p>And lastly</p>
  
  <pre><code>require_once $_SERVER['DOCUMENT_ROOT'] . '/Eif/db_connect.php';
  </code></pre>
  
  <p>I think that the path I'm using is good, but it keeps using it on the wrong way.</p>
  
  <p>What is the problem?</p>
  
  <p>Thanks</p>