0

i am using libCharts in my PHP application ....the graphs are working but when i include it in the application using INCLUDE function then it does not work it give me the error Warning: include(charts/charts-example-line.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\MyProject\index.php on line 349

Warning: include() [function.include]: Failed opening 'charts/charts-example-line.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\MyProject\index.php on line 349

My Graph code is

$chart = new PieChart(500, 250);

$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("Mozilla Firefox (80)", 1000));
$dataSet->addPoint(new Point("Konqueror (75)", 75));
$dataSet->addPoint(new Point("Other (50)", 50));
$chart->setDataSet($dataSet);

$chart->setTitle("User agents for www.example.com");
$chart->render("libchart/demo/generated/demo1.png");


?>
<html>
<body>
<img src="libchart/demo/generated/demo789.png" border=0 />
</body>
</html>

please help me

1 Answers1

0

There's nothing wrong with your graph code. Rather, the libCharts files are not able to be found by PHP, because the directory they are in is not in the "include_path" lists of paths that PHP will search.

You might want to read these PHP manual pages:

CXJ
  • 4,301
  • 3
  • 32
  • 62