Hi,
I've created a PHP file called filename.jpg. It outputs a JPG. I've set up
a .htaccess file to force the filetype to PHP. The file is displayed in a
page on a browser. I cannot get the damn thing to save as my suggested
filename or even as anything but a BMP in IE6. I've tried a bunch of
different combinations of the content-type and content-disposition (inline,
attachment, filename, name) headers. Nothing has worked.
I've tried all combinations of the following header() string (regex for
brevity-I didn't actually use the regex characters):
Content-(T|t)ype: image/jpeg(; (file)?name="?xx.jpg"?)?
with and without:
Content-(D|d)isposition: (inline|attachment)(; (file)?name="?xx.jpg"?)?
followed by:
ImageJPEG($im,'',60);
After many hours pounding my head against the wall and RingTFingM, I
realized 2 things as I was writing this post.
The first is that I'm using session_start(). Take it out and I have no
trouble.
The second is that I've encountered this problem before, spent hours on it,
and finally gave up and passed all parameters to the script by $_GET.
I'd rather not do that again. The image is being used as a server-side
image map. Does anyone know how I can use session_start AND the
Content-disposition header? I've tried placing the header before
session_start, to no avail.
Thanks a bunch,
Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.GlassGiant.com