NameSilo

Date Last Modified

Spaceship Spaceship
Watch
Use this code on any page to display when it was last modified :)
Replace file.php with the name of your file.

PHP:
<?php

$last_modified = filemtime("file.php");
print("Last Modified ");

echo '<br />';

print(date("m/j/y h:i", $last_modified));

?>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Wow this was of great use for me!
Added rep.

A question:

the time that is being displayed, is it the persons time or the time of the country where the server is located? My web site is located in Denmark will a person from USA see the time correct?

Thanks.
 
0
•••
its only the server time. altho its can be adjusted for the users time. ;)
 
0
•••
xlusive said:
its only the server time. altho its can be adjusted for the users time. ;)

Ok. Than I probably skip the time and only have the date.

Is it complex to have it adjust?

Do you have an URL to a tutorial or something?

I guess the script have to find out from which country the visitor is coming and adjust the timezone of the clock accordingly but I am very new to PHP ...
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back