dba_open
打开数据库链接。 
语法: int dba_open(string path, string mode, string handler); 
返回值: 整数 
函数种类: 数据库功能 
 本函数用来打开指定的数据库。参数 path 为数据库的路径及数据库名称,例如 "/tmp/mysite/wahaha.db"。参数 mode 值如下表 
 
| 属性 | 说明 |  
| r | 打开只读既有数据库 |  
| w | 打开可读写既有数据库 |  
| c | 打开可读写数据库,若不存在则建立 |  
| n | 删去现有数据库,若不存在则建立,之后可读写 |  
 
参数 handler 为打开数据库的种类,有 dbm、ndbm、gdbm、db2 或 cdb 等种类。返回值为数据库的代号 ID,若失败则返回 false。本函数和 dba_popen() 不同的地方在于本函数打开的数据库在 PHP 程序结束后即关闭,dba_popen() 会保持与数据库连接,待下次再执行,则不必再打开与数据库的链接。 
 dba_close()  dba_popen()   
 
  |