Beispiel #1
0
$di = dbase_create("test/dbase.dbf", $fields);
$xi = xbase_create("test/xbase.dbf", $fields);
dbase_add_record($di, array("T", "abc", "20060120", 123, "string one"));
dbase_add_record($di, array("F", "def", "20060121", 321, "string two"));
dbase_add_record($di, array("F", "ghi", "20060121", 111, "string trio"));
xbase_add_record($xi, array("T", "abc", "20060120", 123, "string one"));
xbase_add_record($xi, array("F", "def", "20060121", 321, "string two"));
xbase_add_record($xi, array("F", "ghi", "20060121", 111, "string trio"));
dbase_close($di);
xbase_close($xi);
$di = dbase_open("test/dbase.dbf", 2);
$xi = xbase_open("test/xbase.dbf", 2);
dbase_delete_record($di, 2);
xbase_delete_record($xi, 2);
dbase_pack($di);
xbase_pack($xi);
dbase_close($di);
xbase_close($xi);
$di = dbase_open("test/dbase.dbf", 2);
$xi = xbase_open("test/xbase.dbf", 2);
echo "dbase<br>";
echo "index = {$di} <br>";
echo "<br>";
echo "xbase<br>";
echo "index = {$xi} <br>";
echo "header info: ";
print_r(xbase_get_header_info($xi));
dbase_close($di);
xbase_close($xi);
echo "<br><br>";
$di = dbase_open("test/xbase.dbf", 0);
function dbase_pack($dbase_identifier)
{
    return xbase_pack($dbase_identifier);
}