PHP PDO SQLite connection
<p>I created connection to database, but I dont know why it always create a new empty database.sql file. When I rename the database file he creates always a new file instead giving me an error.</p>
<p>Here is my code</p>
<pre><code>    try {
   $db = new PDO(&quot;sqlite:&quot;.__DIR__.&quot;/database.sql&quot;);
    $db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}   catch (Exception $e) {
    echo &quot;Unable to connect&quot;;
    echo $e-&gt;getMessage();
    exit;
}

echo &quot;Connected to the database&quot;;
</code></pre>