Re: gd beginner blues

From: Date: Sun, 14 Jan 2001 18:37:28 +0000
Subject: Re: gd beginner blues
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-5010@lists.php.net to get a copy of this message
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); > ?> > > > > > >

« previous php.windows (#5010) next »