|
sqlite_openOpens an SQLite database and create the database if it does not exist Description
resource sqlite_open
( string
$filename
[, int $mode = 0666
[, string &$error_message
]] )Object oriented style (constructor):
final public SQLiteDatabase::__construct
( string
$filename
[, int $mode = 0666
[, string &$error_message
]] )Opens an SQLite database or creates the database if it does not exist. Parameters
Return Values
Returns a resource (database handle) on success, Examples
Example #1 sqlite_open example
<?php NotesTip
On Unix platforms, SQLite is sensitive to scripts that use the fork() system call. If you do have such a script, it is recommended that you close the handle prior to forking and then re-open it in the child and/or parent. For more information on this issue, see » The C language interface to the SQLite library in the section entitled Multi-Threading And SQLite. Tip
It is not recommended to work with SQLite databases mounted on NFS partitions. Since NFS is notoriously bad when it comes to locking you may find that you cannot even open the database at all, and if it succeeds, the locking behaviour may be undefined.
See Also
|