zdenekgebauer/foxpro-reader

There is no license information available for the latest version (dev-master) of this package.

Read files from FoxPro for DOS

dev-master 2014-01-14 15:15 UTC

This package is auto-updated.

Last update: 2024-10-27 03:21:17 UTC


README

FoxProReader read data from *.dbf and *.fpt from DOS version of FoxPro. Doesn't work for Visual FoxPro files.

Usage

require '../src/foxpro-reader.php';

try {
    $dbf = new FoxProReader('./TEST26.DBF');
    $recordsTotal = $dbf->numRecords();
    for ($i=0; $i<=$recordsTotal-1; $i++) {
        $row = $dbf->getRecord($i, TRUE);
        var_dump($row);
    }
    unset($dbf);
} catch (Exception $e) {
    echo $e->getMessage();
}

NOTE: Class read both files (dbf and fpt) into memory, so this could take a lot of memory for large files.