I am trying to make an online kickstart config file creator. After the file is created on the server how do I get the download dialog to pop up so the user can download it?
+2
A:
the magic is in the content-disposition
http://stackoverflow.com/questions/737045/send-a-file-to-client
Al W
2009-06-12 05:03:30
+5
A:
Content-Disposition header..
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
russau
2009-06-12 05:04:06