Esempio n. 1
0
function CloseDataBase($dbi)
{
    reset($dbi);
    while (list($dbmfile, $dbihandle) = each($dbi)) {
        dbmclose($dbihandle);
    }
    return;
}
Esempio n. 2
0
    $content = implode("\n", $pagehash['text']);
    $content = str_replace("[", "[[", $content);
    $newhash['content'] = explode("\n", $content);
    InsertPage($dbi, $pagename, $newhash);
}
echo "opening dbm file: {$portdbmfile} ... \n";
if (!file_exists($portdbmfile)) {
    echo "File '{$portdbmfile}' does not exist.<br>\n";
    exit;
}
if (!($dbmh = dbmopen($portdbmfile, "r"))) {
    echo "Cannot open '{$portdbmfile}'<br>\n";
    exit;
}
echo " ok ({$dbmh})<p>\n";
$namelist = array();
$ctr = 0;
$namelist[$ctr] = $key = dbmfirstkey($dbmh);
port1_0renderhash($dbi, $dbmh, $key);
while ($key = dbmnextkey($dbmh, $key)) {
    $ctr++;
    $namelist[$ctr] = $key;
    port1_0renderhash($dbi, $dbmh, $key);
}
dbmclose($dbmh);
?>

<p><b>Done.</b>
</body>
</html>
Esempio n. 3
0
 function dba_close($handle)
 {
     return dbmclose($handle);
 }