Best of all, the number of blank lines is not right.
Learning Chart Control Phplot,
Here's the code for test1.php, only 9 lines in total.
Require ' phplot/phplot.php ';
$data = Array (Array (","), Array (', 1));
$plot = new Phplot ();
$plot->setdatavalues ($data);
$plot->settitle (' first Test plot ');
$plot->drawgraph ();
?>
The browser can correctly display a chart as follows:
-----------------
However, when you add a blank line to the first line in the test1.php file, the error is executed. The source files are as follows:
The results of the browser execution are as follows:
Reply to discussion (solution)
Adding a blank line to the first line will output at least one line break in front of the picture data stream
And the picture is displayed by the information provided by the picture stream, the contents of the front more can not be resolved
Thank you, then I would like to plug this chart into other pages how to do it? For example, code execution like the following is wrong
Require ' phplot/phplot.php ';
$data = Array (Array (","), Array (', 1));
$plot = new Phplot ();
$plot->setdatavalues ($data);
$plot->settitle (' first Test plot ');
$plot->drawgraph ();
?>
-----------------------------------------
Insert this line of code on other pages to display the chart correctly
But the problem is
This is possible
But the problem is, I can't pass parameters to test1.php.
Thank you so much, the original can be transmitted to the IMG src parameters. Knot Stickers! ~~