之夜!大家好,我的问题如下:
我有一个文件,我在其中创建了(在一些查询和php语句之后,编码行数不多)一些变量,我想将其绘制为jpgraph的y轴和x轴,但是,当我使用require_once('thefilethatcontainmyvariables.php');
(路径正确!)并调用脚本时,它返回:
“无法显示图片,因为它包含错误”。
这是我正在尝试绘制的内容:
<?php // content="text/plain; charset=utf-8"
require_once ('Modulo_UNIPEDE.php'); //this line is causing the error when outcommented
require_once ('jpgraph.php');
require_once ('jpgraph_scatter.php');
$datax = $duracao_afunda_eleva; //one of the arrays in the file i wish to include.
$datay = $intensidade_elevacao; //one of the arrays in the file i wish to include.
$graph = new Graph(300,200);
$graph->SetScale("linlin");
$graph->img->SetMargin(40,40,40,40);
$graph->SetShadow();
$graph->title->Set("A simple scatter plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$sp1 = new ScatterPlot($datay,$datax);
$graph->Add($sp1);
$graph->Stroke();
?>
那么,有没有人知道为什么会这样?如果没有,是否有人提示如何使用jpgraph从外部文件中绘制变量?因为到目前为止我找不到比这更好的方法。