gally Posted January 21, 2008 Share Posted January 21, 2008 Hi guys, I've found a tool which transforms my MySql data in a .png graph image. I use it inside a script and everything seems work nice. The problem is that only the first created graph is shown. I' try to explain. I've some Db tables, I select one to create the graph and it's shown, then I select another Db table, but it's shown always the first. Looking inside the directory where the 2nd .png is created, I see data from the 2nd table, while from inside the script I see the 1st .png I tried to remove the 2nd file from the dir, but nothing changes, so I think the 1st file is read fron the firefox cache. Is there a way to clear the cache from inside a php script? Following is part of the code actually I use ... $graph->Stroke("pippo.png"); //creates the image echo "<img src = 'pippo.png' alt='grafico 1' />"; //shows the above image if(is_file('pippo.png')) //remove the image from the dir for next processing unlink('pippo.png'); Thank you in advance Quote Link to comment https://forums.phpfreaks.com/topic/87044-solved-cache-problem/ Share on other sites More sharing options...
chronister Posted January 21, 2008 Share Posted January 21, 2008 2 options HTML <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> PHP <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> Nate Quote Link to comment https://forums.phpfreaks.com/topic/87044-solved-cache-problem/#findComment-445178 Share on other sites More sharing options...
gally Posted January 21, 2008 Author Share Posted January 21, 2008 It seems to wok. Thank you very much Quote Link to comment https://forums.phpfreaks.com/topic/87044-solved-cache-problem/#findComment-445230 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.