Image_Graph: works when output is to file.png but throws errors it outputs to screen
| From: | l Burnerheimerton | Date: | Sun, 31 Jul 2005 11:07:17 +0000 |
| Subject: | Image_Graph: works when output is to file.png but throws errors it outputs to screen | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20190@lists.php.net to get a copy of this message | ||
Here's the example I am using - straight out of the
documentation. It works fine if you output it to a
file using:
$Graph->done(array('filename' => './output.png'));
But when I use the following it does not work:
<?php
include 'Image/Graph.php';
$Graph =& Image_Graph::factory('graph', array(400,
300));
$Plotarea =& $Graph->addNew('plotarea');
$Dataset =& Image_Graph::factory('dataset');
$Dataset->addPoint('Denmark', 10);
$Dataset->addPoint('Norway', 3);
$Dataset->addPoint('Sweden', 8);
$Dataset->addPoint('Finland', 5);
$Plot =& $Plotarea->addNew('bar', &$Dataset);
$Graph->done();
?>
The above code throws errors:
Warning: Cannot modify header information - headers
already sent by (output started at
C:\test\TMPi9nskho3w.php:1) in
c:\pear\lib\Image\Graph\Driver.php on line 525
Warning: Cannot modify header information - headers
already sent by (output started at
C:\test\TMPi9nskho3w.php:1) in
c:\pear\lib\Image\Graph\Driver.php on line 526
Warning: Cannot modify header information - headers
already sent by (output started at
C:\test\TMPi9nskho3w.php:1) in
c:\pear\lib\Image\Graph\Driver.php on line 527
Warning: Cannot modify header information - headers
already sent by (output started at
C:\test\TMPi9nskho3w.php:1) in
c:\pear\lib\Image\Graph\Driver.php on line 528
Warning: Cannot modify header information - headers
already sent by (output started at
C:\test\TMPi9nskho3w.php:1) in
c:\pear\lib\Image\Graph\Driver\GD\PNG.php on line 104
Any ideas are much appreciated!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com