Why doesn't php have a blank line in front of the file to execute? File only 9 lines

Source: Internet
Author: User
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! ~~

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.