Date Last Modified

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
its only the server time. altho its can be adjusted for the users time. ;)
 
0
Close
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
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back