note 1253 deleted from function.dbmopen by didou

From: Date: Thu, 11 Jan 2007 00:24:32 +0000
Subject: note 1253 deleted from function.dbmopen by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121546@lists.php.net to get a copy of this message
Note Submitter: admin at cinenet dot com dot mx ---- 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);

« previous php.notes (#121546) next »