mirror of
https://github.com/php/pecl-database-dbase.git
synced 2026-03-24 15:32:17 +01:00
git-svn-id: http://svn.php.net/repository/pecl/dbase/trunk@340852 c90b9560-bf6c-de11-be94-00142212c4b1
30 lines
609 B
PHP
30 lines
609 B
PHP
--TEST--
|
|
dbase_numfields(): basic functionality
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('dbase')) die('skip dbase extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'dbase_numfields_basic.dbf';
|
|
copy(__DIR__ . DIRECTORY_SEPARATOR . 'example.dbf', $filename);
|
|
|
|
$db = dbase_open($filename, DBASE_RDWR);
|
|
var_dump($db);
|
|
|
|
var_dump(dbase_numfields($db));
|
|
|
|
var_dump(dbase_close($db));
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
resource(%d) of type (dbase)
|
|
int(7)
|
|
bool(true)
|
|
===DONE===
|
|
--CLEAN--
|
|
<?php
|
|
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'dbase_numfields_basic.dbf';
|
|
unlink($filename);
|
|
?>
|