On Sun, 24 Mar 2002, Shaun Martinec wrote: > I'm using mysql to store images that I load through a script called > photo.php. I pass it the ID and it displays the image. No problem. However, > when I right-click on the image in my browser (IE6) and choose properties, > it doesn't seem to recognize the format or size even though I'm sending > Content-Type and Content-Length headers. Are there additional headers I need > to send to get this functionalily or is it just because the file extension > of the script is .php and not .gif or .jpg? Also when I right-click and > choose "Save As" it only lets me save as a bmp. Again, it displays fine, I > would just like to make it work like a real image.
Internet Explorer is very dumb about internet file types - it thinks the whole world plays the DOS game of identifying files by the end of the name ("extensions" or whatever they call it). You can fool it by providing a URL that appears to belong to a certain file type. For instance, instead of making a link to "imagedisplay.php?id=45", make a link that points to "imagedisplay.php/picture.jpg?id=45". PHP will still find your imagedisplay.php script, and IE will be happy too. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php