I have read a good bit on Stackoverflow, PHP Doc's, etc. So far nothing helps me open my SQLite3 database in PHP 5.6. This is my code snippet:
$db_file = "D:/Websites/Intranet/InetPub/wwwroot/WebDB/HamLog - SQLite/HamLog.SQLite";
// open database file
//$handle = sqlite_open($db) or die("Could not open database");
//$db = new sqlite($db_file) or die("Could not open Dan's HamLog.SQLite");
//$db = new Database($db_file);
$this->db = new PDO("sqlite:.$db_file", NULL, NULL);
//$this->db = new SQLite3($db_file);
You can see I've tried a number of things that all just died at the open attempt line with an error code. The active try at least gives an error saying it is unable to open the database. I can open the database using the sqlite console. Apparently in recent PHP releases, SQLite has been relegated to obscurity, by old references in the PHP documentation. The best I've found is the SQLite library is now housed in PECL. But then I read that its best to install PECL through PEAR. At this point I need some help. How do I open my SQLite database named: HamLog.SQLite in PHP?