문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top