PDO drivers creating new file

Strange thing happening, while i make the following code and run the same file in browser, the *.db file is created, say like if i change the db file name to something new, it makes file with that name. What is going on and why?

	try {
  $db = new PDO("sqlite:".__DIR__."/dataabase.db");
  $db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
} catch (Exception $e) {
  echo "Unable to connect";
  //echo $e->getMessage();
  exit;
}

whats the unexspected behavior according to the documentation?

https://www.sqlite.org/about.html

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.