dba_popen
(PHP 4, PHP 5, PHP 7, PHP 8)
dba_popen — Open database persistently
Description
dba_popen() establishes a persistent database instance
for path with mode using
handler.
Parameters
-
path -
Commonly a regular path in your filesystem.
-
mode -
It is
rfor read access,wfor read/write access to an already existing database,cfor read/write access and database creation if it doesn't currently exist, andnfor create, truncate and read/write access. -
handler -
The name of the handler which shall be used for accessing
path. It is passed all optional parameters given to dba_popen() and can act on behalf of them. -
args -
Optional string parameters which are passed to the driver.
The
cdb,cdb_make,flatfile,inifile,qdbmandtcadbdrivers do not support additional parameters.The
db1,db2,db3,db4,dbm,gdbm, andndbmdrivers supports a single additional parameter$filemode, which has the same meaning as the$modeparameter of chmod(), and defaults to0644.The
lmdbdriver accepts two additional parameters. The first allows to specify the$filemode(see description above), and the second to specify the$mapsize, where the value should be a multiple of the page size of the OS, or zero, to use the default mapsize. The$mapsizeparameter is supported as of PHP 7.3.14 and 7.4.2, respectively.
Return Values
Returns a positive handle on success or false on failure.

