/**
* ----------------------------------------------------------------
* XBase
* test.php
*
* Developer : Erwin Kooi
* released at : Nov 2005
* last modified by : Erwin Kooi
* date modified : Jan 2005
*
* Info? Mail to info@cyane.nl
*
* --------------------------------------------------------------
*
* Basic demonstration
* download the sample tables from:
* http://www.cyane.nl/phpxbase.zip
*
**/
/* load the required classes */
require_once "Column.class.php";
require_once "Record.class.php";
require_once "Table.class.php";
/* create a table object and open it */
$table = new XBaseTable("test/bond.DBF");
$table->open();
/* print some header info */
echo "version: ".$table->version."
";
echo "foxpro: ".($table->foxpro?"yes":"no")."
";
echo "modifyDate: ".date("r",$table->modifyDate)."
";
echo "recordCount: ".$table->recordCount."
";
echo "headerLength: ".$table->headerLength."
";
echo "recordByteLength: ".$table->recordByteLength."
";
echo "inTransaction: ".($table->inTransaction?"yes":"no")."
";
echo "encrypted: ".($table->encrypted?"yes":"no")."
";
echo "mdxFlag: ".ord($table->mdxFlag)."
";
echo "languageCode: ".ord($table->languageCode)."
";
/* html output */
echo "
| ".$c->getName()." (".$c->getType()." ".$c->getLength().") | "; } echo "
| ".$record->getString($c)." | "; } echo "