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救我的圖像輸出中的文件,並在瀏覽器中不顯示它。 我該如何解決這個問題?