php-src/ext/dba/tests/skipif.inc

21 lines
697 B
PHP
Raw Normal View History

2002-10-25 09:42:29 +00:00
<?php
if (!extension_loaded('dba')) die('skip dba extension not available');
if (!function_exists('dba_handlers')) die ('skip dba_handlers() not available');
if (!sizeof(dba_handlers())) die('skip no handlers installed');
2002-11-03 15:22:32 +00:00
$handler = dba_handlers();
if (in_array('flatfile', $handler)) {
$handler = 'flatfile';
} elseif ($handler[0]=='cdb') { // CDB currently supports only reading
2002-11-03 15:22:32 +00:00
if (count($handler)==1) {
die('skip CDB currently supports only reading');
}
if ($handler[1]=='cdb_make' && count($handler)==2) {
die('skip CDB currently supports only reading and creating');
2002-11-03 15:22:32 +00:00
}
$handler = $handler[1];
} else {
$handler = $handler[0];
2002-11-03 15:22:32 +00:00
}
$HND = strtoupper($handler);
2002-10-25 09:42:29 +00:00
?>