jpgraph doesn't work

ぐ巨炮叔叔 提交于 2020-01-03 04:39:49

问题


I am developing a web application about statistics, so I am using the library jpgraph

What is going wrong is that the graph does not appear. Displays only the browser's broken image icon.

$num  = 20;
$num2 = 10;
$data = array($num,$num2);

$graph = new PieGraph(300,200);
$graph->SetShadow();
$graph->title->Set("Utilizadores Registados");

$p1 = new PiePlot($data);
$graph->Add($p1);
$graph->Stroke();

I am sure that GD is enable.

Thank you!


回答1:


My guess is that your output contains PHP error messages, such as:

Fatal error: Class 'PieGraph' not found

Browsers tend to make it difficult to inspect the source code of a script that generates an image but you should find a way to do it. Commenting out this line:

$graph->Stroke();

... can be a starting point.



来源:https://stackoverflow.com/questions/14069477/jpgraph-doesnt-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!