title: check when a txt file was last written to in PHP
body: <p>I'm writing to a .txt file using php like this:</p>
  
  <pre><code>$File = "example.txt"; 
  $h = fopen($File, 'w');
  $Data = "some info"; 
  fwrite($h, $Data); 
  fclose($h); 
  </code></pre>
  
  <p>But I only want it to write to that file if it's been more than 5 minutes since the last time I wrote to it (essentially I'm creating a 5 minute cache).</p>
  
  <p>Is there any way to check when was the last time I wrote to it and create some kind of conditional statement that triggers the code above?</p>