File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch07_Files/upload_csv2_read.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch07_Files/upload_csv2_read.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch07_Files/upload_csv2_read.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 1 month ago
Size: 326 bytes
 

Contents

Class file image Download
<table>
<tr>
  <th>Field 1</th>
  <th>Field 2</th>
  <th>Field 3</th>
</tr>
<?php

$fn
= $_FILES["csvfile"]["tmp_name"];

$fd = fopen($fn, "r");

while (!
feof($fd)) {
   
$fields = fgetcsv($fd, 0, "\t");
    print
"<tr>";
    print
"<td>$fields[0]</td><td>$fields[1]</td><td>$fields[2]</td>";
    print
"</tr>";
}
?>
</table>

For more information send a message to info at phpclasses dot org.