Documents available for download?

Discussion in 'PHP' started by macamba, Jul 11, 2007.

  1. #1
    Hi all,

    How do I make documents available for download?

    Imagine I have created a directory called 'downloads' in which to store documents and such so they can be downloaded. What URL do I need to make the document available? When using plain old HTML it would be something like './downloads/document.pdf'?

    Or should I store it in the database?

    Macamba
     
    macamba, Jul 11, 2007 IP
  2. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #2
    well, depending on the file type you could just direct them to the file itself. or if using something such as php you could use the application/force-download content-type header and start the download automatically.
     
    ansi, Jul 11, 2007 IP