Answer the question
In order to leave comments, you need to log in
How to prevent db file from being created when opened via PHP PDO?
$db = new PDO("sqlite:file1.db");
If there is no file1.db, PHP PDO will create an empty file. Except as an option:
if(!file_exists ("file1.db"))
{
return;
}
$db = new PDO("sqlite:file1.db");
is there no other way to prevent the creation of an empty db file?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question