* So there should be no space between <?php ?> * 由于<img>标签来使用图片时,该文件中引用的文件应该相对 * 此文件的目录 * * */ require_once '../../includes/connection_settings.php'; require_once '../../classes/adodb/adodb.inc.php'; require_once '../../classes/graph_data_class.php'; /* * */ //Create object $DB = NewADOConnection($_type_of_db_server); $_res_db = @$DB->Connect($_host, $_user, $_password, $_db_name); $GRAPH_DATA1 = new graph_data(&$DB); /* * Lib */ $data = $GRAPH_DATA1->agTest(); $min_size = 0; $GRAPH_DATA1->getSensorDataSet($xdata, "", $min_size, ""); /* Create the data and label array */ for ($i = 0; $i < count($xdata); $i++) { $xlabel[$i] = $xdata[$i][0]; $ydata[$i] = $xdata[$i][1]; } require_once 'jpgraph/src/jpgraph.php'; require_once 'jpgraph/src/jpgraph_line.php'; $width = $_GET['width']; $height = $_GET['height'];
<?php /* 动态显示图片 * line 图表 */ //include('state_common.php'); require_once '../../includes/connection_settings.php'; require_once '../../classes/adodb/adodb.inc.php'; require_once '../../classes/graph_data_class.php'; //Create object $DB = NewADOConnection($_type_of_db_server); $_res_db = @$DB->Connect($_host, $_user, $_password, $_db_name); $GRAPH_DATA = new graph_data(&$DB); $width = $_GET["width"]; $height = $_GET["height"]; $pmargin0 = $_GET["pmargin0"]; $pmargin1 = $_GET["pmargin1"]; $pmargin2 = $_GET["pmargin2"]; $pmargin3 = $_GET["pmargin3"]; $chart_type = $_GET["chart_type"]; $chart_interval = $_GET["chart_interval"]; $time_begin[0] = $_GET["chart_begin_hour"]; $time_begin[1] = $_GET["chart_begin_day"]; $time_begin[2] = $_GET["chart_begin_month"]; $time_begin[3] = $_GET["chart_begin_year"]; $time_end[0] = $_GET["chart_end_hour"]; $time_end[1] = $_GET["chart_end_day"]; $time_end[2] = $_GET["chart_end_month"]; $time_end[3] = $_GET["chart_end_year"]; /* * 图表类型