php如何创建sqlite数据?
最近在学习sqlite数据,虽然对其也是很陌生的,但是经过几天的学习,我也感觉到了网上很多的误区。
比如创建sqlite数据库时,很多资料都需要用file函数来创建一个数据库文件,其实,看了php文档,可见
(no version information, might be only in CVS)
sqlite_open -- Opens a SQLite database. Will create the database if it does not existReturns a resource (database handle) on success, FALSE on error.
The filename parameter is the name of the database. It can be a relative or absolute path to the file that sqlite will use to store your data. If the file does not exist, sqlite will attempt to create it. You MUST have write permissions to the file if you want to insert data or modify the database schema.
The mode parameter specifies the mode of the file and is intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value to use if you need access to the errmessage parameter.
errmessage is passed by reference and is set to hold a descriptive error message explaining why the database could not be opened if there was an error.





