CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Posts
    50

    Unhappy Create a Type of File with PHP

    Hi friend, Its possible to write or create a file with this structure :

    http://www.clicketyclick.dk/database...ormat/fpt.html

    In PHP????

    I'll try but I can't, beacuse I want to give a format with extension .fpt.

    Please somebody know about that???

  2. #2
    Join Date
    Nov 2004
    Location
    Slough, UK
    Posts
    184

    Re: Create a Type of File with PHP

    An ftp file contains the variable length field data for a visual FoxPro table. I would highly recommend that you do not try and edit this file manually, as you will most probably end up corrupting it.

    PHP does however provide a set of functions which enable you to edit an access tables in the dbf format.

    http://www.php.net/dbf

    The downside to this extension, is that it does not lock the file while it is making changes, you have to take care of this yourself using flock(). If you don't lock the file, it is almost inevitable that PHP will open and write to the file simultaneously as by its very nature is designed to handle many requests.

    An even safer method is to set up an ODBC data source which points to the directory containing the DBF file. This manages individual record locking as well as allowing many instances of PHP to make changes to the table at the same time.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || ClickOnline ||

    Did I ever say I was an expert?

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Please mark threads resolved by going to the thread tools menu and clicking the Mark Thread Resolved button.

    Has a post really helped you? Please Rate it.

  3. #3
    Join Date
    Mar 2005
    Posts
    50

    Unhappy Re: Create a Type of File with PHP

    Hello friend, I don't try to file corrupted or corrupting it, just I want to make a files downloaded in the browser, so for that I want to generate or modify the data of these table.

    I think that it's possible with ODBC but I can't to modify or add fields memo, why???,

    Please If you know about that, I'll be greatefully for that.


    The best regards
    XLinux

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured