Click on thumbnailed images to enlarge

Letting a user know when a web page was last modified/updated is easy to do with PHP.

Before you start this tutorial, make sure that your server supports PHP. If it doesn't and you do this tutorial anyways, your work will be all for nothing. To do this, make a file called test.php and type the following in it "Testing. Does PHP work on my server?". Then upload the file to your server, and if you can see the text, then it works. If not, ignore this tutorial because it is no use to you.

Now open up the file that you want to add this script to and copy and paste the following code where you want it to appear:

[quote]<?php echo "[color=green]Last Modified[/color]: " . date ("m/d/y", getlastmod()); ?>[/quote]
You can change where it says [color=green]Last Modified[/color] to whatever you'd like. Then save it as a .php file and you're done!

Tutorial Comments

No comments yet. Be the first one to comment!

Tutorial Details

Author xquizit View profile
Submitted on Feb 11, 2006
Page views 4,238
Favorites 3
Comments 0

Tutorial Tags