PHP » I/O » getlastmod()

Syntax:
int getlastmod()

Returns the last modified date for the current page.

This function is useful for printing when a page was last modified. The time is returned as a timestamp in seconds. If an error occurs, FALSE is returned.

Examples

Code:
<?php

print "This page was last modified: " . date("F d, Y", getlastmod());

?>
Output:
This page was last modified: April 1, 2004
Explanation:

This code prints the last modified date of the current page by feeding the timestamp to the date() function.

See Also: