Baidu Search Download Sqlitemanager tools
PHP5 has been bound SQLite
1, manually added PHP PDO driver extension support, add in php.ini
Extension=php_pdo.dll
Extension=php_pdo_sqlite.dll
Extension=php_sqlite.dll
Extension_dir = "C:\Program files\apache group\php5\ext"
2, in C:\Program Files\apache Group\php5\ext guaranteed to have Php_sqlite.dll,php_pdo_sqlite.dll,
Php_pdo.dll Extension Library
3, restart Apache
4, download Sqlitemanager,create a database, save the name of "Db.sqlite" databases, build tables,
or Sqliteadmin.
5, in the PHP link SQLite
connecting to a database
The following PHP code shows how to connect to an existing database. If the database does not exist, it is created (default is created in the application directory, for example, in the PHP application directory), and a database object is returned.
Open (' test.db ');
}
$db = new MyDB ();
if (! $db) {
echo $db->lasterrormsg ();
} else {
echo "opened database successfully\n";
}
? >
Now, let's run the above program and create our database test.dbin the current directory. You can change the path as needed. If the database is created successfully, the message shown below is displayed:
Open Database successfully