September 2001
Intermediate to advanced
768 pages
32h 45m
English
int getlastmod(void)
Gets the time of the last page modification.
Returns:
UNIX timestamp of file date
Description:
Gets the time of the last page modification. This function should be familiar to users of Apache-style server-side includes (SSI). The function returns the last modified date of the file from which it’s called.
Note:
While the SSI directive returns the time in the default system format, getlastmod() always returns the time as a UNIX style-timestamp. The timestamp can be converted to human-readable dates and times using date().
Example:
$lastmod = getlastmod();
echo ("This page was last modified on ". date("l F Y",
$lastmod). " at ". date("h:ia", $lastmod));
|
Read now
Unlock full access