ดูโค้ดกราฟให้หน่อยค่ะไม่รู้ผิดตรงไหน

<?
ob_start();
session_start();
if(empty($u_user)) // ตรวจสอบว่าผ่านการ login หรือไม่
{
header("location:report.php");
exit();
}
?>
<?
include ("jpgraph/jpgraph.php");
include ("jpgraph/jpgraph_line.php");

include "conn.inc.php";
$SQL="SELECT * FROM filedata WHERE u_user = '$u_user' GROUP BY filename ";
$sqlquery=mysql_db_query($dbname,$SQL);
$num_rows =mysql_num_rows($sqlquery);
$i=0;
while($row=mysql_fetch_array($sqlquery))
{
$xdata[$i]=$row["filename"];
$ydata[$i]=$row["timespent"];
$i++;
}

$graph = new Graph(800,500,"auto");
$graph->SetScale("textlin");

// Adjust the margin
$graph->img->SetMargin(80,50,50,80);
$graph->SetShadow();

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_UTRIANGLE);
$lineplot->value->show();

// Add the plot to the graph
$graph->Add($lineplot);
$title = iconv('TIS-620','UTF-8',"คุณ$u_user");
$graph->title->Set($title);
$graph->title->SetFont(FF_ANGSA,FS_BOLD,20);
$xtitle = iconv('TIS-620','UTF-8',"ชุดงาน");
$graph->xaxis->title->Set($xtitle);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD,20);
$graph->yaxis->title->Set("Time");
$graph->xaxis->title->SetFont(FF_ANGSA,FS_BOLD,20);
$graph->xaxis->SetTickLabels($xdata);
$graph->xaxis->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);


// Display the graph
$graph->Stroke();
?>

 

02 ก.ย. 2552 1 1,795

ถ้าบอกอาการมาด้วยหมอคงวินิจฉัยได้เร็วขึ้น
#1
ความคิดเห็น
ไฟล์อัปโหลด ชนิด jpg, jpeg ขนาดไฟล์ไม่เกิน 1024
^