title: PHP mysql Xampp failed to open stream: No such file or directory
body: <p>I have this two files:</p>
  
  <p>dbconfig.php</p>
  
  <pre><code> &lt;?php
   class database{
  function __construct()
  {
      $db_user="root";
      $db_pass="";
      try {
          $con = new PDO('mysql:host=localhost;dbname=hrm', $db_user, $db_pass);
          $con-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
         }
        catch(PDOException $e)
        {
              echo $e-&gt;getMessage();
          }
      }
  }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>&lt;?php
  
  session_start();
  
   class user
    {
  
   private $db;
  
   function __construct(){
  
      require_once "../dbconfig.php";
       $this-&gt;db= new database();
    }
  </code></pre>
  
  <p>errors:</p>
  
  <p>Warning: require_once(../dbconfig.php): failed to open stream: No such file or directory in C:\xampp\htdocs\hrm2\Class\class.user.php on line 12</p>
  
  <p>Fatal error: require_once(): Failed opening required '../dbconfig.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\hrm2\Class\class.user.php on line 12</p>
  
  <p>Path's:
  I have dbconfig on htdocs folder and i have the class.user.php file in Class folder. 
  Actually i don't know how can the path be wrong because phpstorm is saying that it's right because of the recommended.</p>
  
  <p><a href="https://i.stack.imgur.com/gSLQk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gSLQk.png" alt="enter image description here"></a></p>