Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
error_reporting(1803);
3
require_once 'File/CSV.php';
4
 
5
/*/Example conf:
6
$conf = array(
7
    'fields' => 4,
8
    'sep'    => "\t",
9
    'quote'  => '"',
10
    'header' => false
11
);
12
//*/
13
ob_implicit_flush(true);
14
$argv = $_SERVER['argv'];
15
$file = $argv[1];
16
$write = (isset($argv[2])) ? $argv[2] : false;
17
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "warning: %s\n");
18
 
19
$conf = File_CSV::discoverFormat($file);
20
while ($fields = File_CSV::read($file, $conf)) {
21
    if ($write) {
22
        File_CSV::write($write, $fields, $conf);
23
    }
24
    print_r($fields);
25
}
26
 
27
var_dump($conf);
28
echo "\n"
29
 
30
?>