sunny5050 Posted February 3, 2006 Share Posted February 3, 2006 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 imageImageFill($im, 0,0,black);ImageLine($im, 0, 0, $width, $height, $white);ImageString($im,4,50,150, 'Sales', $white);// output imageHeader ('Content-type: image/png');ImagePng ($im);// clean upImageDestroy($im);?>Please Please Please can somebody help. This is driving me crazy. ThanksSunny Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now