Jpgraph cache problem, error 25113
The jpg-config.inc.php configuration is as follows:
Define (' Use_cache ', TRUE);
Define (' Read_cache ', true);
Define (' Cache_dir ', ' C:/Program files/www/oa/ywtj/tmp/jpgraph_cache/');
The script is as follows:
Include (".. /examples/jpgraph/jpgraph.php ");
Include (".. /examples/jpgraph/jpgraph_bar.php ");
$datay =array (1,2,3,4);//Ordinate data
$datax =array (a,b,c,d);//Horizontal data
foreach ($usernums as $key = = $value) {
$datay [] = $value;
$datax [] = $userids [$key];
}
$graph = new Graph (800,600, ' Auto ', 1); Cache time is 1 minutes ************
$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 ("Utilization Statistics of optical cable");
$graph->xaxis->title->set ("Business department name");
$graph->yaxis->title->set ("operating department occupancy");
$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 ();
On the first visit, a copy picture is generated in the cache folder, and on the 2nd visit, the generated copy picture byte is 0 and the 3rd access error appears.
Share to:
------Solution--------------------
Can't delete cached images?
The file name is empty, how can I delete it?
This thing is very unstable, use caution.