Jump to content

sunny5050

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

About sunny5050

sunny5050's Achievements

0

Reputation

  1. Hi all, im wondering if anyone can shed some ligt on this problem ... im trying to create dynamic graphs in php. In the php.ini file "extension=php_gd2.dll" is already enabled and I am pointing to the correct directory. With all this checked I have taken an example out of a book to see at least if an image can be drawn, however I keep getting this error: Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\dp\testgraph.php:1) in C:\Program Files\xampp\htdocs\dp\testgraph.php on line 15 ‰PNG IHDRÈÈ—–<ÝPLTEÿÿÿUÂÓ~IDATxœíÁà ùS_áU|PÚ ùIEND®B`‚ This is the code: <? // set up image $height = 200; $width = 200; $im = ImageCreate($width, $height); $white = ImageColorAllocate($im,255,255,255); $black = ImageColorAllocate ($im,0,0,0); // draw on image ImageFill($im, 0,0,black); ImageLine($im, 0, 0, $width, $height, $white); ImageString($im,4,50,150, 'Sales', $white); // output image Header ('Content-type: image/png'); ImagePng ($im); // clean up ImageDestroy($im); ?> Please Please Please can somebody help. This is driving me crazy. Thanks Sunny
×
×
  • Create New...