0

I have a website that displays images, the file that displays the image is named: show_image.php

if I try and display an image on Chrome/FF, everything works as normal, but if I use IE, I get the 'save file as' dialog for the show_image.php file..

How can I solve this?

Or Weinberger
  • 7,332
  • 23
  • 71
  • 116
  • 2
    Show a link to an example image or your PHP file's source code. Most likely, you're not sending the correct content type header – Pekka May 01 '11 at 10:04
  • This could be an issue with missing or incorrect headers, but since my crystal ball is broken you should post the contents of show_image.php. – Arjan May 01 '11 at 10:06

1 Answers1

0

Could you provide a link or the show_image.php code?

One possible explanation is that the PHP script might set the HTTP header Content-Disposition: attachment which could cause this. See http://php.net/manual/en/function.header.php#example-3678 for more.

Though I believe that should work the same way in Chrome as in IE, so a link would be helpful.

EDIT: What @Pekka said about sending the wrong content type sounds more plausible. Chrome and Fx may be clever enough to figure out that it is an image, and IE may not be.

Henrik N
  • 15,786
  • 5
  • 82
  • 131