浏览器为何没有图像输出,代码如下:
<?php
require_once( 'src/jpgraph.php');
require_once ('src/jpgraph_bar.php'); //导入Jpgraph类库的柱状图功能
$data = array(80,73,89,85,92,75,85,65,84,79,85,98); //设置统计数据
$graph = new Graph(600,300); //设置画布大小
$graph->SetScale('textlin'); //设置坐标刻度类型
$graph->SetShadow(); //设置画布阴影
$graph->img->SetMargin(40,30,20,40); //设置统计图边距
$barplot = new BarPlot($data); //实例化BarPlot对象
$barplot->SetFillColor('blue'); //设置柱形图前景色
$barplot->value->Show();
$graph->Add($barplot);
$graph->title->Set('吉林省***科技有限公司年度收支'); //设置统计图标题
$graph->xaxis->title->Set('月份'); //设置X轴名称
$graph->yaxis->title->Set('总金额(万元)'); //设置Y轴名称
$graph->title->SetFont(FF_SIMSUN, FS_BOLD); //设置标题字体
$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //设置X轴字体
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //设置Y轴字体
$graph->Stroke(); //输出图像
?>
运行之后,浏览器显示一个叉号而没有图像的输出,这是怎么回事?谢谢
<?php
require_once( 'src/jpgraph.php');
require_once ('src/jpgraph_bar.php'); //导入Jpgraph类库的柱状图功能
$data = array(80,73,89,85,92,75,85,65,84,79,85,98); //设置统计数据
$graph = new Graph(600,300); //设置画布大小
$graph->SetScale('textlin'); //设置坐标刻度类型
$graph->SetShadow(); //设置画布阴影
$graph->img->SetMargin(40,30,20,40); //设置统计图边距
$barplot = new BarPlot($data); //实例化BarPlot对象
$barplot->SetFillColor('blue'); //设置柱形图前景色
$barplot->value->Show();
$graph->Add($barplot);
$graph->title->Set('吉林省***科技有限公司年度收支'); //设置统计图标题
$graph->xaxis->title->Set('月份'); //设置X轴名称
$graph->yaxis->title->Set('总金额(万元)'); //设置Y轴名称
$graph->title->SetFont(FF_SIMSUN, FS_BOLD); //设置标题字体
$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //设置X轴字体
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //设置Y轴字体
$graph->Stroke(); //输出图像
?>
运行之后,浏览器显示一个叉号而没有图像的输出,这是怎么回事?谢谢
ob_end_flush();