php-src/ext/dba/tests/test.inc
Marcus Boerger 93769053cc Use flatfile if available.
# This way we are using the internal library which we know about most.
2002-11-15 16:11:51 +00:00

18 lines
453 B
PHP

<?php
$db_filename = $db_file = dirname(__FILE__).'/test0.dbm';
$handler = dba_handlers();
if (in_array('flatfile', $handler)) {
$handler = 'flatfile';
} elseif ($handler[0]=='cdb') { // CDB currently supports only reading
if (count($handler)==1) {
die('CDB currently supports only reading ');
}
$handler = $handler[1];
} else {
$handler = $handler[0];
}
$lock_flag = 'l';
@unlink($db_filename);
@unlink($db_filename.'.lck');
?>