A 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); ?>
|
Title: Blank
- Re: [PHP-WIN] gd beginner blues Paul Trapnell
- Re: [PHP-WIN] gd beginner blues Alain Samoun