开发者

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 expla开发者_高级运维in in detail how I would create, connect, and retrieve variables.

Regards


You want to use SQLite. Check some tutorials and do it how they suggest:

http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html

http://zetcode.com/databases/sqlitetutorial/

http://freshmeat.net/articles/sqlite-tutorial


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/


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜