Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

pHp and DBF

pHp and DBF

pHp and DBF

I have a domain.

At present I am collecting information from people and sending it to my mail through pHp.

If I need to store them in a dbf, which I may download daily for offline purposes, should I install anything additionally on server side? Or is it just enough if I upload a dbf file with no records?

The script will be pHp only. I just want to access dbf file via pHp.

Looking for knowledge from anyone, anywhere.

RE: pHp and DBF

There are a bunch of PHP functions that can manipulate DBFs. See here for the documentions:

Although there is a dbase_create() function that will create a DBF from scratch, you might find it easier to create an empty DBF ib VFP, and then upload it to your server. You can then use dbase_add_record() to populate it with data.

I suspect that the PHP functions only work with pre-VFP versions of the DBF format (the docs refer to dBASE, which might mean dBASE III Plus). If so, if you create the DBF in VFP, you need to copy it to a type FOX2X.


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: pHp and DBF

Well, as Mike found there are some dBase functions. I have no idea how compatible that would be with VFP DBFs, even when you limit yourself to free 2.x dbfs.

But why so complicated? Alone the download for acting on the data local and then I assume also upload it again?

MySQL is your solution.

There is a whole book of VFP using MySQL from Hentzenwerke.

If you would want to work on DBFs just for the convenience you are used to that, then you would want to establish a WAN. And hosters usually don't offer that and there's much involved in that and the bandwidth and latency will not be good just because you want to avoid a bit of SQL to a MySQL database you most lilkely own with your hosting plan anyway.

Bye, Olaf.

Olaf Doschke Software Engineering

RE: pHp and DBF

Thanks guys.

I'd try Mike's idea first.

It's not just I am used to it. Already there's a software distributed to my friends. At present I am asking them to key in the data received through email. If Mike's idea works out, there will be a considerable time saved and also avoid few errors.

Looking for knowledge from anyone, anywhere.

RE: pHp and DBF

In the document linked by Mikes post there is another link near the bottom.


If your PHP can execute an external program, I think this would probably get you going in a manner that might be more robust.


Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: pHp and DBF

Even in a finished software working with DBFs you could easily write a five liner getting data from a MySQL table and merge it into a DBF. There is no need for PHP acting on a DBF.

You especially won't succeed in a download and replace DBF strategy, if the dBase module doesn't act on the DBF format the software needs.

Bye, Olaf.

Olaf Doschke Software Engineering

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close