Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Date Last Modified

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
NamecheapNamecheap
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.
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
•••
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
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

Parking: find your domains by pasting a list
You can now paste a list of domain names into the search box at the top of the Parking menu. Put one name on each line. Your domain list...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back