You forgot a ")" on the first line of the script:
Header("Content-type: image/png");
Alain
On Sun, Jan 14, 2001 at 02:20:15AM -0800, Paul Trapnell wrote:
> BlankA newbie just needs a wee bit of gd guidance. clicking a GD test file
> prompts a "download" dialogue to pop up, or, on a second test files causes
> lines of "font" errors, then the infamous "header already sent" error, then
> lines of character soup.
>
> the test file below, from John Lim at web.logs.com causes the windows
> "donwload file" dialogue to launch. Gd and zlib both show as "enabled" on
> the phpinfo page, yet this still happens. What could cause this? Anyone has
> any ideas?
>
>
>
> <?php
>
> Header( "Content-type: image/png";
>
> // create image
> $image = imagecreate(200,200);
>
> // create color R=100, G=0, R=0
> $maroon = ImageColorAllocate($image,100,0,0);
>
> // create color R=255, G=255, R=255
> $white = ImageColorAllocate($image,255,255,255);
>
> // create white background
> ImageFilledRectangle($image,0,0,200,200,$white);
>
> // create frame
> ImageRectangle($image,10,10,190,190,$maroon);
>
> // create inner rectangle
> ImageFilledRectangle($image,50,50,150,150,$maroon);
>
> // render image
> ImagePNG($image);
>
> // cleanup memory
> ImageDestroy($image);
> ?>
>
>
>
>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]