Page 1 of 1

Reading DBF

Posted: Wed Oct 04, 2006 7:47 am
by mojeIme
Hi,
I am trying to read from DBF, and i get in problems after i upload the files. The problem is in reading field count.On localhost (using the Apache) everything seem ok:

Code: Select all

$fp = fopen($fileName,"rb");
$buf = unpack("S",fread($fp,2));
$re = $buf[1];
as i get $re = 321 => field count : 9
I am currently able to upload on server with IIS (maybe this is the problem?), and after same dubugging i get $re = "";
I spent almost a day yestareday :D ,so can someone please tell me what i am doing wrong.

Posted: Wed Oct 04, 2006 8:51 am
by volka
Aren't thoses file readable by the dbase extension?
http://de3.php.net/manual/en/ref.dbase.php