Home >Backend Development >PHP Tutorial > jpgraph cache有关问题,异常提示25113
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次访问时就出现错误提示