From d678dac1ba23e7618e5497b24e046f1f7fa74e5a Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Mon, 9 Jun 2014 01:20:18 -0400 Subject: [PATCH] add enc_mtime --- encode.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/encode.php b/encode.php index c18f723..38de080 100644 --- a/encode.php +++ b/encode.php @@ -462,3 +462,12 @@ function enc_linkify($str) { } return $ret; } + +# turns a filename into the unix timestamp of that files modification date +function enc_mtime($dummy, $filename) { + $stat = stat($filename); + if ($stat === false) { + return ''; + } + return '' . $stat['mtime']; +} -- 1.7.10.4