Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2015

    Unanswered: Save files via http headers / maintain files on server? (File vs http maintenance).

    I didn't found any nice materials comparing the two ways of information unload to user. Neither have I a firm understanding of how high my learning curve should be in both cases, which of which to choose for better way. I'm a beginner asking for your professional word of advice. Help me to better formulate for search what I want, Please.

    Is it better to save files from MySQL fields via http headers, or it's even more better to perform the saving of the kept txt files (in one specific folder) and all the maintenance of tempfiles on server (archiving, indexing, cron/planning)?

    1. Learning & get experience in file maintenance?
    2. Finding out how to deal with protocols (download resuming)

    What I've found so far:
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment');
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate');
    header('Pragma: public');
    There's a textfield full of appended edits of a specific user (for example list-ordering/or article appending). Headers should deliver it as a file, while skiping the file creation on a server.
    Or do I just learn how to do it with files and save just file link then accomplish the persistent file-links cleaning (because there would be lots of them)?

    One one side there is a certain straightforwardness in dealing with files but then again I'd prefer the both ways while considering continuing to study MySQL-approach. I understand protocols/headers with PHP are no easy task that's why I'm hopefully leaving the last word for the professional....

    Thanks in advance!
    Last edited by xcislav; 02-20-15 at 08:19.

Tags for this Thread

Posting Permissions

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