Created
April 3, 2017 10:57
-
-
Save EvilWolf/025d6d52707803ed7d0baac4b67ad3a2 to your computer and use it in GitHub Desktop.
Добавляет время файла к строке запроса.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init.php: | |
<?php | |
function AddCacheSeed($path) { | |
$time = filemtime($_SERVER['DOCUMENT_ROOT'] . $path); | |
return $path . '?' . $time; | |
} | |
?> | |
Использование: | |
<link rel="stylesheet" href="<?= AddCacheSeed( SITE_TEMPLATE_PATH . '/css/photoswipe.css') ?>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment