diff options
Diffstat (limited to 'common.php')
-rw-r--r-- | common.php | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2,6 +2,13 @@ define("SRCDIR", realpath(__DIR__ . "/src/")); +function assetver(string $path): string { + $path = SRCDIR . "/" . $path; + if (!is_file($path)) + return "0"; + return md5_file($path); +} + function hzcom_expand(string $pageContents): string { $params = []; $page = SRCDIR . "/pages/" . bin2hex(random_bytes(8)) . ".tmp"; |