SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    header information problem

    I have a strange problem with the following statements:

    PHP Code:
    header("Content-Type: application/octet-stream");
    header("Content-Disposition: attachment; filename=\"file.csv\""); 
    I call these headers after I have gone thru a while-loop to fill the file.csv. (with PHP).

    But when I do so, the browsers wants me to save the page I call this link from first, then the page itself and after the file I intended to save (file.csv).

    How can I change this? How do I change the header information, so the browser will save the file immediately.

    And: is it possible to change the appearance of the page. When the page is loaded now, it reads that it can't load the page... can I maybe add a refresh statement so it automatically loads to a different (more user-friendly) page?

    Please advise

    Jazz

  2. #2
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no one?


Bookmarks

Posting Permissions

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