|
still problem persists |
Posted by Gopal on Jun-03-2011 13:06 |
|
Hello,
Thanks for help, i modified the code as you said. still problem persists the same.
i am attaching the screen shot of output.
following is the code for two files with there respective path
1) C:\\wamp\\www\\ChartDirector\\phpdemo\\barcharta.php
<?php
require_once("C:/wamp/www/ChartDirector/lib/phpchartdir.php");
# The data for the bar chart
$data = array(85, 156, 179.5, 211, 123);
# The labels for the bar chart
$labels = array("Mon", "Tue", "Wed", "Thu", "Fri");
# Create a XYChart object of size 250 x 250 pixels
$c = new XYChart(250, 250);
# Set the plotarea at (30, 20) and of size 200 x 200 pixels
$c->setPlotArea(30, 20, 200, 200);
# Add a bar chart layer using the given data
$c->addBarLayer($data);
# Set the labels on the x axis.
$c->xAxis->setLabels($labels);
# Output the chart
header("Content-type: image/png");
print($c->makeChart2(PNG));
?>
2)C:\\wamp\\www\\ChartDirector\\phpdemo\\a.html
<HTML>
<BODY>
<h1>Hello World!</h1>
<p>Hi, this is my first web page with ChartDirector charts.</p>
<!--<IMG SRC="http://localhost/ChartDirector/phpdemo/barcharta.php"> -->
<IMG SRC="/ChartDirector/phpdemo/barcharta.php">
More HTML elements ......
</BODY>
</HTML>
thanks |
Re: still problem persists |
Posted by Peter Kwan on Jun-03-2011 15:19 |
|
Hi Gopal,
For some reasons, I cannot see the screen shot attachment.
May be you can try:
http://www.mydomain.com/ChartDirector\\phpdemo\\barcharta.php
Would you mind to inform me what is the output?
If what you see is some garbage characters, it means there are some additional code in "barcharta.php" that switches the page to HTML (instead of image/png). Please attached the exact "barcharta.php" file so I can verify if there are any hidden extra characters.
If what you see is an empty page, please make sure you have enabled displaying error message in your web server. In your "php.ini", please set error_reporting to E_ALL, and display_errors to 1, then restart your server. Alternatively, you may try to add the following code at the beginning of barcharta.php to enable error message display.
ini_set('display_errors',1);
error_reporting(E_ALL);
Regards
Peter Kwan |
|