SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apple Numbers download

    I am distributing an Apple Numbers document at http://www.iworkforteachers.com . The link currently directs the user to this php page:
    PHP Code:
    $filename 'gradebook_1_0.numbers';
    header"Location: $filename"); 
    Should I be using a specific mime type, or is a header location sufficient for this download?

    Thanks.

  2. #2
    SitePoint Addict Phidev's Avatar
    Join Date
    Oct 2008
    Location
    Texas
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you are just doing a header location that should be fine as the webserver will sort the right headers for the file you are sending.

    however if you were reading the file and outputing it from php then you would have to specify the content type and disposition of the file you are outputing so the browser knows what to do with it.

  3. #3
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. It's just getting pulled from the filesystem.


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
  •