From: Jason Woofenden Date: Mon, 9 Jun 2014 05:20:18 +0000 (-0400) Subject: add enc_mtime X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=commitdiff_plain;h=d678dac1ba23e7618e5497b24e046f1f7fa74e5a add enc_mtime --- 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']; +}