jpgraph cache有关问题,异常提示25113
程序员文章站
2022-06-06 13:10:39
...
jpgraph cache问题,错误提示25113
jpg-config.inc.php配置如下:
define('USE_CACHE',TRUE);
define('READ_CACHE',true);
define('CACHE_DIR','C:/Program Files/www/oa/ywtj/tmp/jpgraph_cache/');
脚本如下:
include ("../Examples/jpgraph/jpgraph.php");
include ("../Examples/jpgraph/jpgraph_bar.php");
$datay=array(1,2,3,4);//纵坐标数据
$datax=array(a,b,c,d);//横坐标数据
foreach ($usernums as $key => $value){
$datay[] = $value;
$datax[] = $userids[$key];
}
$graph = new Graph(800,600,'auto',1); //********缓存时间为1分钟************
$graph->SetScale("textlin");
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10);
$graph->xaxis->SetLabelAngle(30);
$graph->yaxis->scale->SetGrace(20);
$graph->xaxis->scale->SetGrace(20);
$graph->SetShadow();
$graph->img->SetMargin(40,30,20,40);
$bplot = new BarPlot($datay);
$bplot->SetFillColor('orange');
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10);
$bplot->value->SetAngle(45);
$bplot->value->SetFormat('%d');
$graph->Add($bplot);
$graph->title->Set("光缆利用率统计表");
$graph->xaxis->title->Set("经营部名称");
$graph->yaxis->title->Set("经营部占用情况");
$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->Stroke();
第一次访问时,cache文件夹内生成一个copy图片,第2次访问时,生成的copy图片字节为0,第3次访问时就出现错误提示
jpg-config.inc.php配置如下:
define('USE_CACHE',TRUE);
define('READ_CACHE',true);
define('CACHE_DIR','C:/Program Files/www/oa/ywtj/tmp/jpgraph_cache/');
脚本如下:
include ("../Examples/jpgraph/jpgraph.php");
include ("../Examples/jpgraph/jpgraph_bar.php");
$datay=array(1,2,3,4);//纵坐标数据
$datax=array(a,b,c,d);//横坐标数据
foreach ($usernums as $key => $value){
$datay[] = $value;
$datax[] = $userids[$key];
}
$graph = new Graph(800,600,'auto',1); //********缓存时间为1分钟************
$graph->SetScale("textlin");
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10);
$graph->xaxis->SetLabelAngle(30);
$graph->yaxis->scale->SetGrace(20);
$graph->xaxis->scale->SetGrace(20);
$graph->SetShadow();
$graph->img->SetMargin(40,30,20,40);
$bplot = new BarPlot($datay);
$bplot->SetFillColor('orange');
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10);
$bplot->value->SetAngle(45);
$bplot->value->SetFormat('%d');
$graph->Add($bplot);
$graph->title->Set("光缆利用率统计表");
$graph->xaxis->title->Set("经营部名称");
$graph->yaxis->title->Set("经营部占用情况");
$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->Stroke();
第一次访问时,cache文件夹内生成一个copy图片,第2次访问时,生成的copy图片字节为0,第3次访问时就出现错误提示
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
- 最新文章
- 热门排行
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论