title: how to connect a sqlite database using PHP?
body: <p>i have tried lot to connect database using PHP PDO. i have got lot of samples, i am not sure what was problem.</p>
  
  <p>below is my code</p>
  
  <pre><code>&lt;?php
      try
      {
          // $db = new PDO('sqlite:sampleDB.db3');
          // $db = new SQLiteDatabase('sampleDB.sqlite', 0666, $error);  
          $db = new PDO('sqlite:sampleDB.sqlite');
      }
      catch(PDOException $e)
      {
          echo $e-&gt;getMessage();
      }
  ?&gt;
  </code></pre>
  
  <p>i have tried lot of way to open a connection. please tell me the correct way...</p>