note 1253 modified in dbmopen by ronabop

From: Date: Wed, 04 Oct 2000 14:34:37 +0000
Subject: note 1253 modified in dbmopen by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-6016@lists.php.net to get a copy of this message
Most of the dbm functions can use the full-path of the dbm file as the argument instead of the db identifier generated by dbmopen() in a similar way it used to be on php2. The big exception is dbmclose() that MUST use the db identifier, otherwise the dbm file keeps open. Be aware of that if you're updating your php2 files. i.e. this code works in the most lines, except to close the dbm file: $fn="/full/path/of/dbmfile"; dbmopen($fn,"r"); $row=dbmfetch($fn,"MyKey"); dbmclose($fn); Instead, allways prefer to use: $fn="/full/path/of/dbmfile"; $db=dbmopen($fn,"r"); $row=dbmfetch($db,"MyKey"); dbmclose($db); http://www.php.net/manual/function.dbmopen.php

« previous php.notes (#6016) next »