JpGraph 在linux下无法生成图片,已知gd库和字体都有,也不报错
贴出代码看看
有的linux下可以跑,有的不可以,不可以的linux却可以跑验证码程序
function _day30Act() { $url = $_GET['url']; $datax=array(02-17,02-18,02-19,02-20,02-21); $datay=array(36178,48821,48421,39011,50863); $namex = '最近30天'; $namey = ''; $this->line($datax, $datay, $namex, $namey, $url); } function line($datax, $datay, $namex='', $namey='', $url){ require_once ('pto/jpgraph/jpgraph.php'); require_once ('pto/jpgraph/jpgraph_line.php'); require_once ('pto/jpgraph/jpgraph_date.php'); //$datay = array(8320,9360,14956,17028,13060,15376,25428,16216,28548,18632,22724,28460); //填充的数据// $graph = new Graph(1030,200,"auto"); //创建画布 $graph = new Graph(500,200,"auto"); //创建画布 $graph->img->SetMargin(70,40,30,40); //设置统计图所在画布的位置,左边距50、右边距40、上边距30、下边距40,单位为像素 $graph->img->SetAntiAliasing(); //设置折线的平滑状态 //$graph->SetScale("textlin"); //设置刻度样式 $graph->SetScale('intint'); $graph->SetShadow(); //创建画布阴影 $graph->title->Set($url.'趋势图'); //设置标题 $graph->title->SetFont(FF_SIMSUN,FS_BOLD); //设置标题字体 $graph->SetMarginColor("#fff"); //设置画布的背景颜色为淡蓝色 $graph->yaxis->title->Set($namey); $graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //设置Y轴标题的字体 $graph->xaxis->SetPos("min"); $graph->yaxis->HideZeroLabel(); $graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5'); //$datax=array("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"); //X轴 $graph->xaxis->SetTickLabels($datax); //设置X轴 $graph->xaxis->title->Set($namex); $graph->xaxis->SetFont(FF_SIMSUN); //设置X坐标轴的字体 $graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD); //设置Y轴标题的字体 $graph->yaxis->scale->SetGrace(20);//设置y轴刻度值分辨率 $p1 = new LinePlot($datay); //创建折线图对象 $p1->mark->SetType(MARK_FILLEDCIRCLE); //设置数据坐标点为圆形标记 //$p1->value->Show();//在折线每个点上显示具体的值 $p1->value->SetFormat('%0.1f'); $p1->mark->SetFillColor("#40BBF3"); //设置填充的颜色 $p1->mark->SetWidth(3); //设置圆形标记的直径为4像素 $p1->SetColor("#7CD0F7"); //设置折形颜色为蓝色 $p1->SetCenter(); //在X轴的各坐标点中心位置绘制折线 $graph->Add($p1); //在统计图上绘制折线 $graph->Stroke(); //输出图像 }
php是rpm安装的还是贬义的,是不是少了jpeg的库啊
是否有引入文件,引入文件是都有空格还有bom