header('Content-type: application/zip'); header('Content-Disposition: attachment; filename="File.zip"'); readfile('File.zip');Content-type - Defines what the browser is expecting to serve as content
Content-Disposition - Specifies the type and filename of the download.
readfile - basically sends the content to the output buffer and forces a download dialog.
have fun!
No comments:
Post a Comment