Jump to content
xisto Community
Sign in to follow this  
Blessed

[php] Simple Last Modified

Recommended Posts

 Simple Last Modified

This script will shows when a page was last editted.

make a new file name it (yourpage.php)

We start at the top of the file
add
<?php?>
now after <?php add

$ftime = filemtime("yourpage.php"); //

now we use the date function do define the file date
echo("file was last modified on: ");  echo(date("m/j/y h:i", $ftime));

m/j/y h:i means

m - Numeric representation of a month, with leading zeros 01 through 12 h - hour, 12-hour format of an hour with leading zeros; 01 through 12
i - Minutes with leading zeros; dus "00" to "59"
j - dag van de maand zonder nullen aan het begin; dus "1" tot "31"
Y A full numeric representation of a year, 4 digits Examples: 1999 or 2003
y A two digit representation of a year Examples: 99 or 03


Thats it..
have fun with it ;)

Share this post


Link to post
Share on other sites

Wow, you really do "learn something new everyday." ;) I didn't know that. And was just about to search for a tutorial on it. XD Anyways, nice, short, sweet tutorial. I look forward to any of your others.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.