|
PHP5中文手册
sqlite_open(PHP 5, PECL sqlite:1.0-1.0.3) sqlite_open — Opens a SQLite database and create the database if it does not exist 说明
resource sqlite_open
( string $filename
[, int $mode
[, string &$error_message
]] )
Object oriented style (constructor): SQLiteDatabase
__construct
( string $filename
[, int $mode
[, string &$error_message
]] )
Opens a SQLite database or creates the database if it does not exist. 参数
返回值Returns a resource (database handle) on success, FALSE on error. 范例
Example#1 sqlite_open() example
<?php 注释Tip
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.
|