Every time I access a PHP script that uses the GD2 library to generate a .png image, the browser asks me for a download location and greys out the option of opening the file from its current location. I suspect a browser setting is forcing me to save the image each time, but I just don't know what to change so I can view the image without first saving. Help?😕
Here is one of my scripts' code:
<?php
header("Content-Type: image/png");
$myArcImage = ImageCreateTrueColor(400, 200);
$purple = ImageColorAllocate($myArcImage, 255, 0, 255);
$white = ImageColorAllocate($myArcImage, 255, 255, 255);
ImageFill($myArcImage, 0, 0, $purple);
imageFilledArc($myArcImage, 200, 200, 400, 400, 180, 0, $white, IMG_ARC_PIE);
ImagePNG($myArcImage);
imageDestroy($myArcImage);
?>
Here is my environment:
I am using IE 5.00.3700.1000 on W2K Professional. My PHP code is served from PHP Version 4.3.3.
Thanks.
-Elson