There is an ISAM driver through ODBC that used to come with Windows for comma-delimited text files. However, it'd be too slow and not multi-user compatible, so it'd be pretty much useless.
2007-01-25 13:17:42
·
answer #1
·
answered by Kasey C 7
·
0⤊
0⤋
It will be easier for you to progress if you get yourself more familiar with the general concept of a database. In simple words, database is a way of organizing structured data, such as ticket reservation system, for example. Whether or not the database is backed by a file or files, depends on the particular database engine. And even if they do, generally, your applications do not interact with database files directly, but instead use SQL to interact with (relational) database engines. PHP supports most database engines available today. So .txt or .data file by itself will not necessarily make a database. However, If full-fledged database is an overkill for what you need and you just need to persistenly store texts or binary objects such as videos, on the web server, you can just use PHP functions such as file_get_contents() and file_write_contents() to read/write entire file as one. I wouldn't recommend messing up with XML if you are new to databases. Work with simple things first. serialize() and unserialize() functions may help you, as they allow to pack complex objects/arrays into text strings and unpack them back. If you just want to store array of records, that may be just enough. Note that whatever you choose to implement file-based storage, be aware of data concurrency - i.e. think about what happens when multiple processes (PHP requests) access (i.e. write) the same data at the same time. Database engines solve this problem internally, but in case of file, you're on your own.
2016-03-29 02:43:45
·
answer #2
·
answered by ? 4
·
0⤊
0⤋