2
0

cache.class.php 360 B

12345678910111213141516
  1. <?php
  2. class cache
  3. {
  4. public static function getFileWithTime(string $_file){
  5. if (file_exists($_file)) {
  6. return $_file . "?v=" . date("YmdHis", filemtime($_file));
  7. } else {
  8. return $_file;
  9. }
  10. }
  11. public static function printFileWithTime(string $_file){
  12. echo self::getFileWithTime($_file);
  13. }
  14. }