dba_popen
(PHP 4, PHP 5, PHP 7)
dba_popen — Open database persistently
Description
dba_popen ( string $path , string $mode [, string $handler ], mixed ...$args ) : resource|false
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.
See Also
- dba_open() - Open database
- dba_close() - Close a DBA database
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.dba-popen.php