advanced code snippet search
irishsk on 11/11/08
1 person have marked this snippet as a favorite
header("Content-type: application/octet-stream"); // displays progress bar when downloading (credits to Felix ;-))header("Content-Length: " . filesize('myImage.jpg')); // file name of download fileheader('Content-Disposition: attachment; filename="myImage.jpg"'); // reads the file on the serverreadfile('myImage.jpg');
Report this snippet
You need to login to post a comment.