我正在尝试为本教程中给出的php图表实现PHP Graph演示(http://www.ebrueggeman.com/phpgraphlib/documentation/tutorial-mysql-and-phpgraphlib)。但是在添加演示的第二行时,它会显示黑屏。这是前两行演示
include("phpgraphlib.php");
$graph=new PHPGraphLib(550,350);
我查了服务器PHP版和GD版。它们是按顺序黑屏的原因是什么,以及如何实现php图。感谢。
答案 0 :(得分:0)
只是为了参考而回答..
include("phpgraphlib.php");
$graph = new PHPGraphLib(400,300);
$data = array("Alex"=>99, "Mary"=>98, "Joan"=>70, "Ed"=>90);
$graph->addData($data);
$graph->setTitle("Test Scores");
$graph->setTextColor("blue");
$graph->createGraph();