title: Fatal error: require_once(): Failed opening required '.\DbConnect.php' (include_path='B:\xamp\php\pear')
body: <blockquote>
    <p>Fatal error: require_once(): Failed opening required '.\DbConnect.php'
    (include_path='B:\xamp\php\pear') in
    B:\xamp\htdocs\Library\includes\DbOperations.php on line 12</p>
  </blockquote>
  
  <pre><code>&lt;?php
  include'B:\xamp\php\pear';
  class DbOperations{
  private $con;
  function __construct(){
       require_once dirname(_FILE_).'/DbConnect.php'; --&gt;Error
       $db = new DbConnect();
       $this-&gt;con = $db-&gt;connect();
   }
   /*CRUD -&gt; C -&gt; CREATE*/
  /*********************STUDENT TABLE******************************/
  function createstudent($username,$password,$email){
      $password = md5($pass);
      $stmt = $this-&gt;con-&gt;prepare("INSERT INTO `tbl_student` (`id`, `username`, `email`, `password`, `CourseName`, `Semester`, `RegDate`, `updationDate`) VALUES (NULL, '?', '?', '?', '?', '?', current_timestamp(), NULL);");
      $stmt-&gt;bind_param("sss",$username,$password,$email);
      /*$stmt-&gt;bind_param(':username',$username,PDO::PARAM_STR);
      $stmt-&gt;bind_param(':password',$password,PDO::PARAM_STR);
      $stmt-&gt;bind_param(':email',$email,PDO::PARAM_STR);*/
      if($stmt-&gt;excute()){
          return true;
      }
      else {
          return false;
      }
  }
  ?&gt;
  </code></pre>
  
  <p>I have specified the right path for the pear , but still, the same error is popping up not sure what's wrong.</p>
  
  <p>This is DbConnect.php</p>
  
  <pre><code>&lt;?php 
  //include('B:\xamp\php\pear');
  class DbConnect{
      private $con;
      function __construct(){
      }
      function connect(){
          include_once dirname(_FILE_).'/Constants.php';
          $this-&gt;con = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
          if(mysqli_connect_errno()){
              echo "Failed to connect with Database".mysqli_connect_err();
          }
          return $this-&gt;con;
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Error messages</p>
  
  <blockquote>
    <p>Warning: include(B:\xamp\php\pear): failed to open stream: Permission
    denied in B:\xamp\htdocs\Library\admin\includes\DbOperation.php on
    line 3</p>
    
    <p>Warning: include(): Failed opening 'B:\xamp\php\pear' for inclusion
    (include_path='B:\xamp\php\pear') in
    B:\xamp\htdocs\Library\admin\includes\DbOperation.php on line 3</p>
    
    <p>Warning: include(B:\xamp\php\pear): failed to open stream: Permission
    denied in B:\xamp\htdocs\Library\includes\DbOperations.php on line 3</p>
    
    <p>Warning: include(): Failed opening 'B:\xamp\php\pear' for inclusion
    (include_path='B:\xamp\php\pear') in
    B:\xamp\htdocs\Library\includes\DbOperations.php on line 3</p>
    
    <p>Warning: Use of undefined constant <em>FILE</em> - assumed '<em>FILE</em>' (this
    will throw an Error in a future version of PHP) in
    B:\xamp\htdocs\Library\includes\DbOperations.php on line 12</p>
    
    <p>Warning: require_once(.\DbConnect.php): failed to open stream: No such
    file or directory in B:\xamp\htdocs\Library\includes\DbOperations.php
    on line 12</p>
    
    <p>Fatal error: require_once(): Failed opening required '.\DbConnect.php'
    (include_path='B:\xamp\php\pear') in
    B:\xamp\htdocs\Library\includes\DbOperations.php on line 12</p>
  </blockquote>