Login   Register  
PHP Classes
elePHPant
Icontem

read_dbf.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      DBF Class  >  All threads  >  read_dbf.php  >  (Un) Subscribe thread alerts  
Subject:read_dbf.php
Summary:Minor issue
Messages:3
Author:Larry Wakeman
Date:2009-11-19 18:19:07
Update:2009-11-19 18:36:28
 

  1. read_dbf.php   Reply   Report abuse  
Picture of Larry Wakeman
Larry Wakeman
2009-11-19 18:19:07
This is a fairly minor thing but I would change lines 18-33 of the read_dbf.php to:

$thefile = '';
if (isset($_GET['f'])) {
$thefile=$_GET['f'];
} elseif (isset($_POST['f'])) {
$thefile=$_POST['f'];
}

I always run my development environment with display_errors on and I highly recommend this to all developers. Good practice to write code that doesn't produce runtime errors even though this is masked in the production environment where I turn display_error off.

Larry

  2. Re: read_dbf.php   Reply   Report abuse  
Picture of Larry Wakeman
Larry Wakeman
2009-11-19 18:25:16 - In reply to message 1 from Larry Wakeman
I also added the following at line 2:

$PHP_SELF = $_SERVER['SCRIPT_NAME'];

  3. Re: read_dbf.php   Reply   Report abuse  
Picture of Larry Wakeman
Larry Wakeman
2009-11-19 18:36:28 - In reply to message 1 from Larry Wakeman
Last one:

Change $f to $thefile on line 44.

The important thing is that the class seems to be working rather well. I am working on a project to move a GoldMine application to SugarCRM and I am hoping to use your submission to read the dbase files and load them into MySQL so that I can then create an import script to import the data into the SugarCRM database.