Jpgraph cache problem, error 25113

Source: Internet
Author: User
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.


Reply to discussion (solution)

Can't delete cached images?
The file name is empty, how can I delete it?

This thing is very unstable, use caution.

Thank you moderator, it indicates that the cache image can not be deleted, the principle of the actual application of the cache should be the first time to return the picture to the browser also generate copy to the cache, the 2nd visit should be access to the cache and determine, based on the length of the cache copy to determine whether to return the browser or update the cache, But I feel in the application, no matter at any time to access the program, all write to the cache, the first generation of the picture copy, but the 2nd time the picture copy updated to 0 bytes, more puzzled.

No, it's a knot.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.