查查手册不就行了么?XIX. dBase functions
Introduction
These functions allow you to access records stored in dBase-format (dbf) databases. There is no support for indexes or memo fields. There is no support for locking, too. Two concurrent webserver processes modifying the same dBase file will very likely ruin your database. dBase files are simple sequential files of fixed length records. Records are appended to the end of the file and delete records are kept until you call dbase_pack(). We recommend that you do not use dBase files as your production database. Choose any real SQL server instead; MySQL or Postgres are common choices with PHP. dBase support is here to allow you to import and export data to and from your web database, because the file format is commonly understood by Windows spreadsheets and organizers. Installation
In order to use these functions, you must compile PHP with the --enable-dbase option. Runtime Configuration
This extension does not define any configuration directives.Resource Types
This extension does not define any resource types.Predefined Constants
This extension does not define any constants.Table of Contents
dbase_add_record — Add a record to a dBase database
dbase_close — Close a dBase database
dbase_create — Creates a dBase database
dbase_delete_record — Deletes a record from a dBase database
dbase_get_record_with_names — Gets a record from a dBase database as an associative array
dbase_get_record — Gets a record from a dBase database
dbase_numfields — Find out how many fields are in a dBase database
dbase_numrecords — Find out how many records are in a dBase database
dbase_open — Opens a dBase database
dbase_pack — Packs a dBase database
dbase_replace_record — Replace a record in a dBase database
Introduction
These functions allow you to access records stored in dBase-format (dbf) databases. There is no support for indexes or memo fields. There is no support for locking, too. Two concurrent webserver processes modifying the same dBase file will very likely ruin your database. dBase files are simple sequential files of fixed length records. Records are appended to the end of the file and delete records are kept until you call dbase_pack(). We recommend that you do not use dBase files as your production database. Choose any real SQL server instead; MySQL or Postgres are common choices with PHP. dBase support is here to allow you to import and export data to and from your web database, because the file format is commonly understood by Windows spreadsheets and organizers. Installation
In order to use these functions, you must compile PHP with the --enable-dbase option. Runtime Configuration
This extension does not define any configuration directives.Resource Types
This extension does not define any resource types.Predefined Constants
This extension does not define any constants.Table of Contents
dbase_add_record — Add a record to a dBase database
dbase_close — Close a dBase database
dbase_create — Creates a dBase database
dbase_delete_record — Deletes a record from a dBase database
dbase_get_record_with_names — Gets a record from a dBase database as an associative array
dbase_get_record — Gets a record from a dBase database
dbase_numfields — Find out how many fields are in a dBase database
dbase_numrecords — Find out how many records are in a dBase database
dbase_open — Opens a dBase database
dbase_pack — Packs a dBase database
dbase_replace_record — Replace a record in a dBase database
你看看这句话
There is no support for indexes or memo fields.
你再看看我的要求!
dbase_create: 建立 dBase 资料表。
dbase_open: 开启 dBase 资料表。
dbase_close: 关闭 dBase 资料表。
dbase_pack: 清理 dBase 资料表。
dbase_add_record: 加入资料到 dBase 资料表。
dbase_delete_record: 删除 dBase 资料表的资料。
dbase_get_record: 取得 dBase 资料表的资料。
dbase_numfields: 取得 dBase 资料表的栏位数。
dbase_numrecords: 取得 dBase 资料表的列数。
dbase_create: 建立 dBase 资料表。
dbase_open: 开启 dBase 资料表。
dbase_close: 关闭 dBase 资料表。
dbase_pack: 清理 dBase 资料表。
dbase_add_record: 加入资料到 dBase 资料表。
dbase_delete_record: 删除 dBase 资料表的资料。
dbase_get_record: 取得 dBase 资料表的资料。
dbase_numfields: 取得 dBase 资料表的栏位数。
dbase_numrecords: 取得 dBase 资料表的列数。
php.net上新提供的函数
dbase_replace_record -- Replace a record in a dBase database
dbase_get_record_with_names -- Gets a record from a dBase database as an associative array
所以要读memo没有好的办法
浅妄薄见,望与斟酌
dbase_create: 建立 dBase 资料表。
dbase_open: 开启 dBase 资料表。
dbase_close: 关闭 dBase 资料表。
dbase_pack: 清理 dBase 资料表。
dbase_add_record: 加入资料到 dBase 资料表。
dbase_delete_record: 删除 dBase 资料表的资料。
dbase_get_record: 取得 dBase 资料表的资料。
dbase_numfields: 取得 dBase 资料表的栏位数。
dbase_numrecords: 取得 dBase 资料表的列数。
php.net上新提供的函数
dbase_replace_record -- Replace a record in a dBase database
dbase_get_record_with_names -- Gets a record from a dBase database as an associative array
所以要读memo没有好的办法
浅妄薄见,望与斟酌
如果光要做到读写dbf格式的文件(包括memo和index)还是比较容易的,资料很多的,c/c++实现的源代码也很多,自己改改应该不复杂,但效率就很难保证,而且并发控制用php很难实现。
怎么读取memo?
著名的有codebase,不过这个是商业软件,源代码不常见到。
odbc应该可以访问的,
最好通过odbc倒到别的数据库里。
如果搬迁到别的机器上比如linux不就傻了!
我想,在linux下访问dbf怎么都比不上mysql吧。