Download file with internet explorer & safari

Hello, 

I would like to enable my users to download link directly when they click on a picture. What a want to do is to implement these two lines in a php file (it must be the first lines of the page). Where should I write them ? Thank you very much
   header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$_GET['path']);
readfile($_GET['path']);

Comments

Sign In or Register to comment.