I'm having a problem with some simple code:
<html>
<body>
<?php
header("Content-type: image/png");
$im = imagecreate(200, 200);
$green = imagecolorallocate($im, 0, 255, 0);
imagefill($im, 0, 0, $green);
imagepng($im);
imagedestroy($im);
?>
</body>
</html>
When I view the page, I get "‰PNG
IHDRÈÈ—–<ÝPLTEÿ4^À¨IDATxœ*Áà ùS_áU|PÚ
ùIEND®B`‚ "
I've isolated the problem to be with the imagepng($im); line. Any
suggestions? Thanks.