#1
  1. No Profile Picture
    falcon
    Guest
    Devshed Newbie (0 - 499 posts)
    I wonder if anyone can help,

    I have created a .csv file through php and stored it in a directory. What I want do is provide a link for the user to download the file. Unfortunetly it displays the file instead of downloading it, is there any way of setting headers or something to make it download the file.

    Thanks for your help in advance.

    Falcon.
  2. #2
  3. No Profile Picture
    sawz
    Guest
    Devshed Newbie (0 - 499 posts)
    perhaps if you zipped it it would download?

    what exactly is a csv
  4. #3
  5. No Profile Picture
    Zedz
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,

    I believe your problem is the following:
    The server has been instructed what kind of headers to add to files, if the file type is unknown it says to your browser to view it as text.

    With known filetypes, it says to the browser which header it has and then the browser decides what to do with it.

    i.e. Download it/Open it...

    I think that's it

    ------------------
    *-------------------------------*
    Platinum Award - ThinkQuest 1999
    http://www.ThinkQuest.org

    ES2000 - Team 25014
    http://library.advanced.org/25014

    WebZanity Design
    http://www.WebZanity.com
    *-------------------------------*
  6. #4
  7. No Profile Picture
    falcon
    Guest
    Devshed Newbie (0 - 499 posts)
    Thanks for your help.

    I sorted it by just zipping it up

    CSV file= Comma Seperated Value file

    Thanx

    Falcon

Similar Threads

  1. force download a file works but something weird comes next
    By darthweef in forum PHP Development
    Replies: 1
    Last Post: October 26th, 2003, 01:33 PM
  2. forcing file download for unknown types
    By kinetic in forum Flash Help
    Replies: 3
    Last Post: October 19th, 2003, 07:25 AM
  3. Creating an Image gallery
    By cmccomas in forum PHP Development
    Replies: 6
    Last Post: June 16th, 2003, 04:20 AM
  4. Force download of file
    By yourgod17 in forum PHP Development
    Replies: 2
    Last Post: October 13th, 2001, 10:47 PM
  5. MySQL compilation error
    By dman in forum MySQL Help
    Replies: 0
    Last Post: March 15th, 2001, 04:03 PM

IMN logo majestic logo threadwatch logo seochat tools logo