How to create a new database in PHP with SQLite3?
$db = new SQLite3($dbname);
just opens the db, but I want to create if not exist.
To create you do use the new
statement:
// create or open (if exists) the database
$database = new SQLite3('myDatabase.sqlite');
If you have named a database that doesn't exist it should get created.