Reading DBF

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mojeIme
Forum Newbie
Posts: 22
Joined: Sat Jul 29, 2006 8:58 am

Reading DBF

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Aren't thoses file readable by the dbase extension?
http://de3.php.net/manual/en/ref.dbase.php
Post Reply