File Modification Time Action

This action allows you to display the modification time of any file on the filesystem. Save this as actions/filemtime.php:

        filemtime action
        Displays the modification time of a file
        Syntax: {{filemtime path="/path/to/file"}}

$path = trim($vars['path']);

if (file_exists($path)) {
        echo "<font size=-2>" . date("M d, Y h:i:s a", filemtime($path)) . "</font>";
} else {
        echo "<!-- ERROR (filemtime): '" . htmlspecialchars($path) ."' not found -->";


If you find this action useful, post a comment and let me know! Also, feel free to comment with requests for feature enhancements. --JasonHuebel

There are 6 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki