Created
March 20, 2013 03:51
-
-
Save MaraScott/5202180 to your computer and use it in GitHub Desktop.
Name : getLastModification() - Language : PHP - type : function - Platform : generic - tag : timestamp, version, images
This file contains hidden or 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
| <?php | |
| // put a timestamp after images as a variable to be sure to update the cache on the client side | |
| // see : http://php.net/manual/en/function.filemtime.php | |
| function getLastModification ($filename = __FILE__) { | |
| if (file_exists($filename)) { | |
| return filemtime($filename); | |
| } else { | |
| return '404'; | |
| } | |
| } | |
| // alias | |
| function _glm ($f) { | |
| getLastModification($f); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment