Skip to content

automatically timestamp file version based on the latest modification date

License

Notifications You must be signed in to change notification settings

willarin/fileversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic file version based on the timestamp

Format file path by adding datetime segment if necessary.

Append the last modified timestamp to the file name in the form of [file_name]?v=[timestamp].

Installation

Add the extention using composer:

"almeyda/fileversion": "*"

Usage

<link rel="stylesheet" type="text/css" href="<?php echo \almeyda\fileversion\src\FileVersion::set('pathToCssFileFromTheRoot'); ?>">
<img src="<?php echo \almeyda\fileversion\src\FileVersion::set('pathToImgFileFromTheRoot'); ?>">
<script src="<?php echo \almeyda\fileversion\src\FileVersion::set('pathToJsFileFromTheRoot'); ?>"></script>

About

automatically timestamp file version based on the latest modification date

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages