I'm writing a PHP script that show img to user from hidden path.
in index.php:
<a href="view_img.php?f=image.jpg">image.jpg</a>
in view_img.php:
header("Content-Type: image/jpeg");
header('Content-Disposition: inline; filename='.$f);
@readfile("hidden_path/".$f);
The image shows up correctly but the problem is when you try to save the picture from IE6
It shows up as untitled.bmp
It doesn't event allow you to select different format, and I don't think it convert it to bmp either.
This problem only occur with IE. Netscape allow you to save the image with proper name. So looks like the header is sent correctly.
But the IE problem really annoyed me.
I search through internet and seems that IE is having this problem and it could be solve if you delete your IE temporary file.
I tried that and still doesn't solve it.
Anyone know something wrong with my code or solution to this?