Location: PHPKode > scripts > Legacy Files > legacy-files/dem.php
<?

require('LegacyFiles.php');

$Legacy = new LegacyFiles("TDDF0407.TXT","DDTALCALC");
$Legacy->DefineHeaderFormat(
  array(
    array('HH1','A',8,0),
    array('YYY','Y',9,0),
    array('HH2','A',5,0),
    array('FFF','N',6,0),
    array('HH3','A',1,0),
    array('NNN','N',6,0),
    array('HH4','A',27,0)
  )
);
$Legacy->DefineFooterFormat(
  array(
    array('TT1','A',8,0),
    array('YYY','Y',9,0),
    array('TT2','A',5,0),
    array('FFF','N',6,0),
    array('TT3','A',1,0),
    array('NNN','N',6,0),
    array('TT4','A',27,0)
  )
);
$Legacy->DefineFieldsFormat(
  array(
    array('CORP','N',4,0),
    array('STORE','N',4,0),
    array('SHIP','N',6,0),
    array('DEVID','N',11,0),
    array('PKG','N',3,0),
    array('VALUE','N',9,2),
    array('WEIGHT','N',7,3),
    array('VOLUME','N',7,3),
    array('ZONE','A',1,0),
    array('STATUS','N',1,0)
  )
);

$Legacy->ReadFile();

print_r($Legacy->_errors);
print_r($Legacy->_header);
print_r($Legacy->_records);
print_r($Legacy->_footer);


?>
Return current item: Legacy Files