Results 1 to 1 of 1
Thread: need help downloading a jpg
Dec 24, 2005, 08:02 #1
- Join Date
- Dec 2005
- 0 Post(s)
- 0 Thread(s)
need help downloading a jpg
im want to download a jpg file but its not working plz check and response...........ASAP
$filename = $_GET['imgname'];
$filepath = $_GET['img'];
$sid = $_GET['sid'];
$size = filesize($filepath);
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Disposition: attachment; filename=".$filename);
in $filepath i have the value "prodimages/imagename.jpg"
where prodimage is a folder in my site where the images r placed and the file with the download script is in the root of my site same as the prodimages folder.
im getting the size to but its not downloading instead image it downloads a html file
plz advise and correct...