Michael
Michael

Reputation: 479

Simples Database

I have a bunch of php pages that run on local host. Its basically a web dashboard for different web apps. I have a config.php file that has all my variables in it. They are mainly urls, password and usernames.. Now I want to remove the config file and replace it with a database. I don't want to set up an entire database though. Is there a way maybe with mysql lite that I can create a datebase file that acts like a database? So if I ever copy all the php files and move them to another computer I can just copy the database file and it will work right away. Is this possible? If yes please explain in detail how I would create, connect, and retrieve variables.

Regards

Upvotes: 2

Views: 111

Answers (3)

Quentin
Quentin

Reputation: 943571

SQLite (nothing to do with MySql Lite Administrator) is an SQL database which stores all its data in easily transferable files.

PHP has an extension that supports SQLite.

Upvotes: 0

Chris Laplante
Chris Laplante

Reputation: 29658

SQLite will do what you want: http://php.net/manual/en/book.sqlite.php.

The databases are self-contained within a single file. Check their website for more information: http://www.sqlite.org/

Upvotes: 1

Related Questions