PHP Classes

File: examples/download.php

Recommend this page to a friend!
  Classes of Everton da Rosa   Txt Xtrator   examples/download.php   Download  
File: examples/download.php
Role: Example script
Content type: text/plain
Description: script de exemplo
Class: Txt Xtrator
Convert data from CSV to other text based formats
Author: By
Last change:
Date: 13 years ago
Size: 522 bytes
 

Contents

Class file image Download
<?php
/*
 * TxtXtrator - arquivo de exemplo
 * Mostra como utilizar o método download()
 */
function noSpace($string){
   
$string = trim($string);
    return
$string;
}

require
'../TxtXtrator.class.php';
$TxtXtrator = new TxtXtrator();
$filename = 'CREDOR.TXT';
$TxtXtrator->loadFile($filename);
$TxtXtrator->loadTpl('credor.json');
$TxtXtrator->setCsvSeparator(';');
$TxtXtrator->xtract();
$TxtXtrator->setOutputType('sql');
$TxtXtrator->setLineBreakType('windows');
$TxtXtrator->output();
$TxtXtrator->download();
?>