Jump to content

a better way to do date modified script?


webguync

Recommended Posts

I have a small script on the bottom of all my pages on my site which list the date and time the page was modified. I want to make the script an include and just put that on the page, but as it is now scripted that won't work since you have to change the page name for every page. Is there a way to change this so it can be an include?

$last_modified = filemtime("pagename.php");
print("Last Modified ");
print(date("m/j/y h:i", $last_modified));?>

Link to comment
https://forums.phpfreaks.com/topic/223019-a-better-way-to-do-date-modified-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.