sqliteHow to configure SQLite with XAMPP on Windows?
- Install XAMPP from Apache Friends website.
- Download SQLite from SQLite Download Page.
- Extract the downloaded file in
C:\xampp\php\extdirectory. - Open
php.inifile inC:\xampp\phpdirectory and add the following line at the end of the fileextension=php_sqlite3.dll - Restart XAMPP.
- Test the installation by running the following code in
C:\xampp\htdocs
<?php
$db = new SQLite3('test.db');
$db->exec('CREATE TABLE foo (bar STRING)');
$db->exec("INSERT INTO foo (bar) VALUES ('This is a test')");
$result = $db->query('SELECT bar FROM foo');
var_dump($result->fetchArray());
?>
Output example
array(1) {
[0]=>
string(14) "This is a test"
}
- Finally, you can access the SQLite database through the XAMPP server.
More of Sqlite
- How do I use UUIDs in SQLite?
- How do I use SQLite with Visual Studio?
- How do I use a SQLite viewer to view my database?
- How can I adjust the text size in SQLite?
- How do I use the SQLite SUBSTRING function?
- How do I troubleshoot a near syntax error when using SQLite?
- How can I resolve a SQLite header and source version mismatch?
- How do I use SQLite keywords to query a database?
- How do I generate XML output from a SQLite database?
- How do I truncate a table in SQLite?
See more codes...