0
我尝试在我的页面上显示图像并将其保存到文件中。 我的代码是:Phplot绘制图像并将其保存在文件中
//Define the object
$plot = new PHPlot(400,400,'res.png');
$plot->SetIsInline(True);
//Define some data
$example_data = array(
array('a',3),
array('b',5),
array('c',7),
array('d',8),
array('e',2),
array('f',6),
array('g',7)
);
$plot->SetDataValues($example_data);
//Turn off X axis ticks and labels because they get in the way:
$plot->SetXTickLabelPos('none');
$plot->SetXTickPos('none');
//Draw it
$plot->DrawGraph();
我尝试调用它的HTML:
<img src="image.php">
但olnly救我的图像输出中的文件,并在浏览器中不显示它。 我该如何解决这个问题?