JPG File Download Source Code

 

 <?php

 

        $FileName = 'yourimage.jpg';   

 

        $Path = WWW_ROOT.'files'.DS.'ctscan'.DS;    

     
        header('Content-Type: image/jpg');


        header("Content-Length: " . filesize($Path.$FileName));


        header("Content-Disposition: attachment; filename=$FileName");      

     
        readfile($Path.$FileName); 

 

?>