jpgraph不起作用 [英] jpgraph doesn't work
本文介绍了jpgraph不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发有关统计信息的Web应用程序,因此我在使用库 jpgraph
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();
我确定GD已启用.
谢谢!
推荐答案
我的猜测是您的输出包含PHP错误消息,例如:
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.
这篇关于jpgraph不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文