How can I store and access SQLite databases from a central location?
Posted
by Brian Ramsay
on Stack Overflow
See other posts from Stack Overflow
or by Brian Ramsay
Published on 2010-04-24T22:52:06Z
Indexed on
2010/04/24
23:03 UTC
Read the original article
Hit count: 156
I have installed SQLite on my UNIX system, and am planning on accessing it from PHP. However, the database is created in the directory I initialize it in, and if a script runs in a different directory a new database is created in the same directory.
Is there an option for SQLite (or the PHP wrappers) to create the databases in one location, and have those databases accessible just by name outside of that directory?
Ideally, I'd like to be able to do something like $db=new SQLiteDatabase("db.test");
in any directory and have it reference the same database, if that makes sense.
© Stack Overflow or respective owner